导航

2005年7月15日

摘要: 继承A generic class that uses parameterized types, like MyClass1<T>, is called an open-constructed generic. A generic class that uses no parameterized types, like MyClass1<int>, is called a ... 阅读全文

posted @ 2005-07-15 16:35 美丽软件 阅读(361) 评论(0) 推荐(0) 编辑

摘要: 一、如何对范型添加约束构造方法,在范型方法后边public static T Max<T>(T op1, T op2) where T : IComparable{}在类后边class MyList<T> where T:new(){}约束的种类有:where T : struct type must be a value type (a struct)where T : ... 阅读全文

posted @ 2005-07-15 16:08 美丽软件 阅读(258) 评论(0) 推荐(0) 编辑