摘要:
2013-07-30 17:09:26 1 using System; 2 class Program 3 { 4 static void Swap(int a,int b) { int t=a;a=b;b=t; } 5 static void Main() { int a=3,b=5; Swap(a,b); Console.WriteLine("a={0} b={1}",a,b); } 6 } 7 改成引用传递后: 8 using System; 9 class Program10 {11 static void Swap(ref int a,re... 阅读全文