protected void Page_Load(object sender, EventArgs e)
{
int a = 1;
int B = 2;
int C = 0;
C=a<int>(ref a, ref B);
Response.Write(C);
}
private void a<T>(ref T a,ref T b)
{
T Tem = default(T);
Tem = a;
a = b;
b = Tem;
return Tem;;
}
}
泛类型方法的简单例子
最新推荐文章于 2022-06-23 09:40:11 发布