I apologize that this a simple question, but the solution escapes me.
I'm passing an int to a method but want to return a string.
Thank you for the assistance.
I'm passing an int to a method but want to return a string.
C#:
public static int Example(int x )
{
string myString = "";
if(x < 10)
{
myString = "less than ten.";
}
else
{
myString = "greater than ten.";
}
//return a string of what x means.
return myString;
}
Thank you for the assistance.