Einzelnen Beitrag anzeigen

Benutzerbild von DP News-Robot
DP News-Robot

Registriert seit: 4. Jun 2010
15.767 Beiträge
 
#1

SafeGetEnumName a safer implementation of TypInfo.GetEnumName

  Alt 21. Jun 2024, 10:50
I just had the need for a safer version of Delphi’s GetEnumName, which checks whether the enum value passed to it is actually valid. This is what I came up with: The difference to the original is the IF statement in line 25 that checks whether Value is < T.MinValue or > T.MaxValue. If the … <a href="https://blog.dummzeuch.de/2024/06/21/safegetenumname-a-safer-implementation-of-typinfo-getenumname/" class="more-link">Continue reading <span class="screen-reader-text">SafeGetEnumName a safer implem

Weiterlesen...
  Mit Zitat antworten Zitat