扩展 delphi 泛型 以实现类似lambda功能 , C#中的any count first last 等扩展方法

扩展 delphi 泛型 以实现类似lambda功能 , C#中的any count first last 等扩展方法在C#中对泛型的扩展,输入参数是泛型本身的内容,返回值则是bool.基于这一点,开始构造在delphi下如何实现.首先1.delphi 是支持匿名函数的其语法为:名称 = reference to 函数类型定义例如:TFun = reference to function(const num: Integer): Integer;2.对泛型的扩展的语法如下:TList = class(Generics.Collections.TList) public *********...
posted @ 2013-08-12 10:49  林Lin☆☆  阅读(1305)  评论(1编辑  收藏  举报