The Methods of System.Enum

The enum keyword is an alias for System.Enum located in the .NET Framework class library. System.Enum provides numerous valuable methods relevant for enumerations. You can study them by looking at the .NET Framework Documentation. It is beyond the scope of this book to provide a discussion of these, but the incomplete list of functionality that follows should give you an idea of System.Enums usefulness. You can

  • Convert strings to enumerated values.
  • Convert enumerated values into readable text.
  • Determine whether a particular value is one of the defined values of an enumeration.
  • Check the underlying type of the enumeration.
  • Determine the symbolic name of an enumeration member representing a particular value.

To ...

Get C# Primer Plus now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.