Vote UpVote

TypeInfo workaround

Yet Another Programming Blog – This is going to be a short one. Just wanted to share a simple and elegant work-around for this QC issue: type TypeOf<T> = record class function TypeInfo: PTypeInfo; static; class function Name: string; static; class function Kind: TTypeKind; static; end; { TypeOf<T> } class function TypeOf<T>.Kind: TTypeKind; var LTypeInfo: PTypeInfo; begin LTypeInfo := TypeInfo; if LTypeInfo <> nil then Result := LTypeInfo^.Kind else Result := tkUnknown; end; class function TypeOf<T>.Name: string; var LTypeInfo: PTypeInfo; begin LTypeInfo ...
Favorite? Off-Topic? alex @ 2009-10-11 15:29


Visits: 476
Votes: 1
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)