Friday, September 5, 2008

Returning multiple values from a Function

public static int add(int a, int b, ref int c)
{
c = a + 2;
return a + b;
}

We can use out and ref,can be called as shown below

int e = add(2, 3, ref d);

0 comments: