62,046
社区成员
发帖
与我相关
我的任务
分享
protected void Page_Load(object sender, EventArgs e)
{
Maths<int> mm = new Maths<int>();
Response.Write(mm.Adds(8,9) + "<br/>");
Maths<decimal> ms = new Maths<decimal>();
Response.Write(ms.Adds(8.5,9.5));
}
class Maths<T>
{
public T Adds(T t1,T t2)
{
return t1+t2;
}
}
class Maths<T>
{
public T Adds(T t1,T t2)
{
return t1+t2;
}
}