+ 1
I want example for passes the values between the methods in C#
5 Answers
+ 1
public int testMethod(int param)
{
return param;
}
public void driver()
{
int x = 5 + testMethod(5);
}
//What is the value of x when the method
//called driver executes?
+ 1
Do you mean Arguments or return types?
+ 1
I hope this helps. if you know the value of x when the code executes you have a good idea of how passing arguments and return types work. Ask if you have any specific questions.
0
both
0
thanks