Skip to content

Instantly share code, notes, and snippets.

@jpluimers
Created August 31, 2013 10:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpluimers/6397446 to your computer and use it in GitHub Desktop.
Save jpluimers/6397446 to your computer and use it in GitHub Desktop.
function EnumerationName(const Value: Integer; const Info: PTypeInfo): string;
//...
begin
if Info^.Kind <> tkEnumeration then
raise Exception.CreateFmt('Info %s is not an enumerated type', [GetTypeInfoName(Info)]);
//...
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment