Skip to content

T_CodeJam_EnumHelper

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

EnumHelper Class

Extension methods for Enum types

Inheritance Hierarchy

System.Object
  CodeJam.EnumHelper
Namespace: CodeJam
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0

Syntax

C#

public static class EnumHelper

VB

<ExtensionAttribute>
Public NotInheritable Class EnumHelper

F#

[<AbstractClassAttribute>]
[<SealedAttribute>]
[<ExtensionAttribute>]
type EnumHelper =  class end

The EnumHelper type exposes the following members.

Methods

 

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

See Also

Reference

CodeJam Namespace

Clone this wiki locally