3.4.1 证明不同 服装类型具有不同的静态字段
class TypeWithField<T> { public static string field; public static void PrintField() { Console.WriteLine(field + ":" + typeof(T).Name); } } class Program { static void Main(string[] args) { TypeWithField<int>.field = "first"; TypeWithField<string>.field = "second"; TypeWithField<DateTime>.field = "third"; TypeWithField<int>.PrintField();//first:Int32 TypeWithField<string>.PrintField();//second:String TypeWithField<DateTime>.PrintField();//third:DateTime } }