using System;
public class Program
{
static int doubleVar(int i)
i = i*2;
return i;
}
static int doubleVarRef(ref int i)
i=i*2;
return 5;
public static void Main()
// first let's call the function using the value
int j=1;
j = doubleVar(j);
Console.WriteLine("j= "+ j);
// now, let's call the function using the reference
int x = doubleVarRef(ref j);