分享 - C# 写的一个泛型类
using System;
using System.Collections.Generic;
using System.Text;
namespace Genericity
{
class Program
{
public class GenericityHello <T>
{
//private T t;
public void SayHello(T t)
{
Console.WriteLine(t.ToString());
}
}
public class GenericityHello1 <T>
{
private T tt;
public T TT
{
get
{
return tt;
}
set
{
tt = value;
}
}
public void SayHello()
{
Console.WriteLine(tt.ToString());
}
}
public class English
{