public static void Main(string[] args) { ParamRef pr = new ParamRef(); Console.WriteLine("호출 전 : {0}", pr.myVal); ParamTest.Increase(ref pr); Console.WriteLine("호출 후 : {0}", pr.myVal); }
public static void Increase(ref ParamRef varRef) { varRef.myVal++; }