How can I get an enumeration's valid ranges using RTTI or TypeInfo in Delphi
问题 I am using RTTI in a test project to evaluate enumeration values, most commonly properties on an object. If an enumeration is out of range I want to display text similar to what Evaluate/Modify IDE Window would show. Something like "(out of bound) 255". The sample code below uses TypeInfo to display the problem with a value outside the enumeration as an Access Violation when using GetEnumName . Any solution using RTTI or TypeInfo would help me, I just don't know the enumerated type in my test