static void Main(string[] args)
{
string a="liu";
string b="li";
Swap<string>(ref a,ref b);
Console.WriteLine("{0},{1}",a,b);
}
public static void Swap<T>(ref T a, ref T b)
{
T c ;
c = a;
a = b;
b = c;
}
有用
最新推荐文章于 2022-02-25 21:57:21 发布