Hey....hello all
i am writing a very simple function of calculating a square of a number entered by the user and then displaying it. While writing the function in c# i am getting n number of errors regarding conversion type....plz help me out of this .....here is the function...
function square(int x)
{
int result = 0;
int val = (Convert.ToInt32(TextBox1.Text)); // is this correct ??
result = val * val;
return (result); // error of type conversion
}
and for calling this function shall i write call square(textbox1.text)
or simply the function name ??? plz help me out soon !
cya
Rohan