上一页 1 ··· 6 7 8 9 10
摘要: 代码如下: program TCustomComparerTest;{$APPTYPE CONSOLE}uses SysUtils, Generics.Defaults, Generics.Collections;type TCustomerStringComparer = class(TCustomComparer<String>) public function Compa... 阅读全文
posted @ 2011-10-14 01:34 wouldguan 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 代码如下: program TComparerTest;{$APPTYPE CONSOLE}uses SysUtils, Generics.Defaults, Generics.Collections;type TIntStringComparer = class(TComparer<String>) public function Compare(const Left, Ri... 阅读全文
posted @ 2011-10-14 00:41 wouldguan 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 代码如下: program TStackTest;{$APPTYPE CONSOLE}uses SysUtils, Generics.Collections;var Stack: TStack<String>;begin Stack := TStack<String>.Create(); Stack.Push('John'); Stack.Push('Mary'); Stack... 阅读全文
posted @ 2011-10-14 00:20 wouldguan 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 没什么功能,简单敲一下: 代码如下: program TQueueTest;{$APPTYPE CONSOLE}uses SysUtils, Generics.Collections, Forms;var Queue: TQueue<String>;begin Queue := TQueue<String>.Create(); Queue.Enqueue('John'); Qu... 阅读全文
posted @ 2011-10-14 00:08 wouldguan 阅读(533) 评论(0) 推荐(0) 编辑
摘要: 程序代码: program TListTest;{$APPTYPE CONSOLE}uses Generics.Collections, SysUtils, Windows, Forms;var List: TList<Integer>; FoundIndex: Integer;begin List := TList<Integer>.Create(); List.AddRang... 阅读全文
posted @ 2011-10-13 00:12 wouldguan 阅读(211) 评论(0) 推荐(0) 编辑
摘要: program TArrayTest;{$APPTYPE CONSOLE}uses SysUtils, Generics.Collections, Generics.Defaults, Windows;var arr: array of string; i, findIndex: integer; count: Cardinal;begin setLength(arr, 5); cou... 阅读全文
posted @ 2011-10-12 22:52 wouldguan 阅读(642) 评论(0) 推荐(0) 编辑
摘要: 文章来自:http://interactiveasp.net/blogs/spgilmore/archive/2009/12/23/using-generics-in-delphi.aspx包含泛型的单元:Generics.Defaults, Generics.Collections, SysUtils.pasHere are the public declarations in Generics.Defaults.pas:Classes / InterfacesDescriptionIComparer<T>Implements a compare function returni 阅读全文
posted @ 2011-09-10 21:44 wouldguan 阅读(302) 评论(0) 推荐(0) 编辑
摘要: Graphics 单元新增了 TWICImage 类, 该类的功能源于新增的 Wincodec.pas 单元.WIC 支持的图像有 BMP、PNG、ICO、JPEG、GIF、TIFF、HDP(HDP 是微软随 Vista 推出的新的图像格式).TWICImage 的大多功能都非常容易使用, 它最强大的功能是 ImagingFactory: IWICImagingFactory 属性, 这是个类工厂的接口.通过 TWICImage.ImagingFactory 获取类工厂后, 再调用 CreateBitmapFlipRotator 建立旋转变换接口(IWICBitmapFlipRotator). 阅读全文
posted @ 2011-08-29 10:50 wouldguan 阅读(2443) 评论(1) 推荐(0) 编辑
摘要: 1.插入排序:procedure in_sort(var a: array of Integer; k, m: Integer);var p: Integer;begin p := 0; while p = 0 do begin if k >= a[m] then begin a[m + 1] := k; p := 1; end else begin a[m + 1] := a[m]; Dec(m); if m = -1 then begin a[m + 1] := k; ... 阅读全文
posted @ 2011-08-25 15:29 wouldguan 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 以后就更新这个博客吧。 阅读全文
posted @ 2011-08-11 12:31 wouldguan 阅读(80) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10