operator && cannot be applied to operands of type bool and method group

else if (touch.phase == TouchPhase.Ended && quit.HitTest)
{
Anim.Play(“fgfffhfffthjjbczsd”);
}

This code works on javascript, but on c sharp i get. “Operator && cannot be applied to operands of type bool and method group.”

Fyi:quit is a GUI texture

Im a noob so i dont know what i did incorrectly.

HitTest is a function and therefore requires an open and closing parentheses. The HitTest function also requires at minimum a Vector3 for an argument. So your code would look like this.

else if (touch.phase == TouchPhase.Ended && quit.HitTest(myVector3))
{
    Anim.Play("MyAnim");
}

You can find more information about the HitTest() function here: Unity - Scripting API: GUIElement.HitTest