static void Main(string[] args) { string a = "0"; int b = 0; Console.WriteLine("调用函数前"); Console.WriteLine("a: {0}",a); Console.WriteLine("b: {0}", b); Test(ref a, ref b); Console.WriteLine(""); Console.WriteLine("调用函数后"); Console.WriteLine("a: {0}", a); Console.WriteLine("b: {0}", b); Console.Read(); } static void Test(ref string a, ref int b) { a = "001"; b = 100; }