Skip to content

Methods_T_CodeJam_EnumHelper

Andrew Koryavchenko edited this page Jun 17, 2018 · 5 revisions

EnumHelper Methods

The EnumHelper type exposes the following members.

Methods

 

Name Description
Public methodStatic member AreFlagsDefined(TEnum) Determines whether all bits of the flags combination are defined.
Public methodStatic member ClearFlag(TEnum) Clears the flag.
Public methodStatic member GetDescription(TEnum) Returns description of enum value.
Public methodStatic member GetDisplayName(TEnum) Returns description of enum value.
Public methodStatic member GetEnumValue(TEnum) Gets metadata about enum value.
Public methodStatic member GetEnumValues(Type) Returns enum values collection that contains information about enum type and its values.
Public methodStatic member GetEnumValues(TEnum)() Gets enum values collection that contains information about enum type and its values.
Public methodStatic member GetField(TEnum) Gets field info of enum value.
Public methodStatic member GetFlagsMask(TEnum) Returns a combination of all flags declared in the enum.
Public methodStatic member GetName(TEnum) Returns name of the enum value.
Public methodStatic member GetNames(TEnum) Retrieves an array of the names of the constants in a specified enumeration.
Public methodStatic member GetNameValues(TEnum) Returns a dictionary containing the enum names and their values.
Public methodStatic member GetValues(TEnum) Retrieves an array of the values of the constants in a specified enumeration.
Public methodStatic member IsAnyFlagSet(TEnum) Determines whether any bit from specified flag is set.
Public methodStatic member IsAnyFlagUnset(TEnum) Determines whether any bit from specified flag is not set.
Public methodStatic member IsDefined(TEnum)(String) Determines whether the string representation of value is defined.
Public methodStatic member IsDefined(TEnum)(TEnum) Determines whether the specified value is defined.
Public methodStatic member IsFlagsEnum(TEnum) Determines whether the enum has flags modifier.
Public methodStatic member IsFlagSet(TEnum) Determines whether the specified flag is set.
Public methodStatic member IsFlagUnset(TEnum) Determines whether the specified flag is not set.
Public methodStatic member Parse(TEnum) Parse the enum value.
Public methodStatic member SetFlag(TEnum)(TEnum, TEnum) Sets the flag.
Public methodStatic member SetFlag(TEnum)(TEnum, TEnum, Boolean) Sets or clears the flag depending on enabled value.
Public methodStatic member TryParse(TEnum)(String, Boolean) Try to parse the enum value.
Public methodStatic member TryParse(TEnum)(String, TEnum) Try to parse the enum value.
Public methodStatic member TryParse(TEnum)(String, Boolean, TEnum) Try to parse the enum value.
  Back to Top

See Also

Reference

EnumHelper Class
CodeJam Namespace

Clone this wiki locally