现代Delphi版本有没有?(我在Delphi 7中看过TWordApplication)
通常我使用CreateComObject,但也许有更方便/更强大的方式,支持Word 2007/2010?
在我的应用程序中,我创建了TList类型列表,用于存储整数或双精度:
TKList<T> = class
private
FItems: TList<T>;
function GetItem(Index: Integer): T;
procedure SetItem(Index: Integer; const Value: T);
function GetMaxValue(): T;
function GetMinValue(): T;
public
constructor Create; overload;
constructor Create(const AKList: TKList<T>); overload;
destructor Destroy; override;
procedure Assign(const AKList: TKList<T>);
function Add(const AValue: T): Integer;
procedure Clear;
function Count: Integer;
procedure Invert;
function ToString: string; override;
function Info: string;
property Values[Index: Integer]: T read GetItem write SetItem; default;
end;
Run Code Online (Sandbox Code Playgroud)
如何实现Invert()过程来反转泛型List中的值?
提前致谢.