摘要: 在转换中使用了TInput和TOutput泛型类型.TInput是委托方法的参数.TOutput是返回类型. 我们现在把Racer类型转换为Person类型. 阅读全文
posted @ 2008-01-28 11:09 白虎 阅读(3109) 评论(1) 推荐(0) 编辑
摘要: 从数据库中直接导出取道泛型里面. 阅读全文
posted @ 2008-01-28 10:24 白虎 阅读(625) 评论(0) 推荐(0) 编辑
摘要: 3.泛型排序 List类可以对其元素排序.Sort()方法有几个重载的版本: public void List.Sort(); public void List.Sort(Comparison); public void List.Sort(IComparer); public void List.Sort(Int32,Int32,IComparer); 阅读全文
posted @ 2008-01-28 10:15 白虎 阅读(2807) 评论(1) 推荐(0) 编辑
摘要: System.Collections.Generic命名空间中的LIst类不使用对象,而是在使用时定义类型. 下面的例子中List类的泛型类型定义为int,所以int类型在JIT编译器动态生成的类中使用,不再进行装拆箱的操作: 阅读全文
posted @ 2008-01-28 09:42 白虎 阅读(4179) 评论(1) 推荐(1) 编辑
非常感谢dudu,感谢博客园提供的各种服务。
联系白虎(David.Du)