1
vote
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 ...
Statistics
|
Visits by Source |
User Actions |




