Pass Variable to public Variable for processing?

I thought I used to do things like this all the time but I am either having an off day or dreaming about features that I never used?

Anway, what I am trying to do is very simple. I often do this.

private string variableA = "";

variableA = variableB;

public varibaleB { 
   get{
         return "Answer!";
}
} 

// which works well right? I also often do this. 
private string variableA = "";
CalculateVariableB();

public void CalculateVariableB (int numberA, int numberB){
  if(numberA>numberB)
variableA = "YES";
else
variableA = "NO";
}


// Works well right? Now here is where the problem comes in, I wish to do this.

private string variableA = "";

variableA = variableB(1,5);

public string variableB(int numberA, int numberB){  //Edit:  <--- This is where the problem is, while this looks good, this line does not work as I can not pass the variables into the string. 
    if(variableA > variableB)
         return "YES";
 else
       return "NO";
}

I think when I used to write in Javascript it was something like

function VariableB(numberA : int, numberB : int) : string{
    // do something and return a string?

}

But I am not sure I remember correctly or how to pull it off in C#.

Thanks guys.

public string variableB(int numberA, int numberB){ //Edit: <— This is where the problem is, while this looks good, this line does not work as I can not pass the variables into the string.
if(variableA > variableB)
return “YES”;
else
return “NO”;
}

change it to this

public string variableB(int numberA, int numberB){  //Edit:  <--- This is where the problem is, while this looks good, this line does not work as I can not pass the variables into the string. 
    if(numberA> numberB)
         return "YES";
 else
       return "NO";
}

public string x { get { return Foo(1, 2); } }

    private static string Foo(int x, int y)
    {
        return (x > y) ? "Bigger" : "Smaller";
    }

What you’re looking for?

   Debug.Log(x) 

Would result in : “Smaller” in this case.

Yeah as the answer states below you’re bug was that you weren’t testing the two method parameters namely numberA & numberB

 public string variableB(int numberA, int numberB)
 {  
     if(variableA > variableB) //Should be (numberA > numberB)
         return "YES";
     else
         return "NO";
 }