class Program { static void Main(string[] args) { string a = "001"; int b = 0; Console.WriteLine("call before"); Console.WriteLine("a: {0}", a); Console.WriteLine("b: {0}", b); TestRef(ref a, ref b); Console.WriteLine(""); Console.WriteLine("call after"); Console.WriteLine("a: {0}", a); Console.WriteLine("b: {0}", b); Console.Read(); } static void Test(ref string a, ref int b) { a = "100"; b = 100; } }