摘要:
代码如下: program TCustomComparerTest;{$APPTYPE CONSOLE}uses SysUtils, Generics.Defaults, Generics.Collections;type TCustomerStringComparer = class(TCustomComparer<String>) public function Compa... 阅读全文
摘要:
代码如下: program TComparerTest;{$APPTYPE CONSOLE}uses SysUtils, Generics.Defaults, Generics.Collections;type TIntStringComparer = class(TComparer<String>) public function Compare(const Left, Ri... 阅读全文
摘要:
代码如下: program TStackTest;{$APPTYPE CONSOLE}uses SysUtils, Generics.Collections;var Stack: TStack<String>;begin Stack := TStack<String>.Create(); Stack.Push('John'); Stack.Push('Mary'); Stack... 阅读全文
摘要:
没什么功能,简单敲一下: 代码如下: program TQueueTest;{$APPTYPE CONSOLE}uses SysUtils, Generics.Collections, Forms;var Queue: TQueue<String>;begin Queue := TQueue<String>.Create(); Queue.Enqueue('John'); Qu... 阅读全文