KGy SOFT

EnumTEnum Class

KGy SOFT Core Libraries Help
Generic helper class for the Enum class. Provides faster solutions for already existing functionality in the Enum class along with some additional features.
Inheritance Hierarchy

SystemObject
  KGySoft.CoreLibrariesEnumTEnum

Namespace:  KGySoft.CoreLibraries
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.0.0-rc.1
Syntax

public static class Enum<TEnum>
where TEnum : struct, new(), IConvertible

Type Parameters

TEnum
The type of the enumeration. Must be an Enum type.

The EnumTEnum type exposes the following members.

Methods

  NameDescription
Public methodStatic memberAllFlagsDefined(Int64)
Gets whether every single bit value in flags are defined in the TEnum type, or, when flags is zero, it is checked whether zero is defined in TEnum.
Public methodStatic memberAllFlagsDefined(UInt64)
Gets whether every single bit value in flags are defined in the TEnum type, or, when flags is zero, it is checked whether zero is defined in TEnum.
Public methodStatic memberAllFlagsDefined(TEnum)
Gets whether every single bit value in flags are defined in the TEnum type, or, when flags is zero, it is checked whether zero is defined in TEnum.
Public methodStatic memberClearCaches
Clears caches associated with TEnum enumeration.
Public methodStatic memberGetFlags
Gets the defined flags in TEnum, where each flags are returned as distinct values.
Public methodStatic memberGetFlags(TEnum, Boolean)
Public methodStatic memberGetFlagsMask
Gets a TEnum value where all defined single flag values are set.
Public methodStatic memberGetName(Int64)
Retrieves the name of the constant in the specified enumeration that has the specified value.
Public methodStatic memberGetName(UInt64)
Retrieves the name of the constant in the specified enumeration that has the specified value.
Public methodStatic memberGetName(TEnum)
Retrieves the name of the constant in the specified enumeration that has the specified value.
Public methodStatic memberGetNames
Retrieves the array of the values of the constants in enumeration TEnum.
Public methodStatic memberGetValues
Retrieves the array of the values of the constants in enumeration TEnum.
Public methodStatic memberHasFlag(TEnum, Int64)
Gets whether the bits that are set in the flags parameter are set in the specified value.
Public methodStatic memberHasFlag(TEnum, UInt64)
Gets whether the bits that are set in the flags parameter are set in the specified value.
Public methodStatic memberHasFlag(TEnum, TEnum)
Gets whether the bits that are set in the flags parameter are set in the specified value.
Public methodStatic memberIsDefined(Int64)
Gets whether value is defined in TEnum as a field value.
Public methodStatic memberIsDefined(String)
Gets whether value is defined in TEnum.
Public methodStatic memberIsDefined(UInt64)
Gets whether value is defined in TEnum as a field value.
Public methodStatic memberIsDefined(TEnum)
Gets whether value is defined in TEnum.
Public methodStatic memberIsSingleFlag(Int64)
Gets whether only a single bit is set in value. It is not checked, whether this flag is defined in TEnum.
Public methodStatic memberIsSingleFlag(UInt64)
Gets whether only a single bit is set in value. It is not checked, whether this flag is defined in TEnum.
Public methodStatic memberIsSingleFlag(TEnum)
Gets whether only a single bit is set in value. It is not checked, whether this flag is defined in TEnum.
Public methodStatic memberParse(String, Boolean)
Converts the string representation of the name or numeric value of one or more enumerated values to an equivalent enumerated object.
Public methodStatic memberParse(String, String, Boolean)
Converts the string representation of the name or numeric value of one or more enumerated values to an equivalent enumerated object.
Public methodStatic memberToString(TEnum, String)
Returns the String representation of the given enum value specified in the value parameter.
Public methodStatic memberToString(TEnum, EnumFormattingOptions, String)
Returns the String representation of the given enum value specified in the value parameter.
Public methodStatic memberTryParse(String, TEnum)
Tries to convert the string representation of the name or numeric value of one or more enumerated values to an equivalent enumerated object. In case of success the return value is  and parsed enum is returned in result parameter.
Public methodStatic memberTryParse(String, Boolean, TEnum)
Tries to convert the string representation of the name or numeric value of one or more enumerated values to an equivalent enumerated object. In case of success the return value is  and parsed enum is returned in result parameter.
Public methodStatic memberTryParse(String, String, TEnum)
Tries to convert the string representation of the name or numeric value of one or more enumerated values to an equivalent enumerated object. In case of success the return value is  and parsed enum is returned in result parameter.
Public methodStatic memberTryParse(String, String, Boolean, TEnum)
Tries to convert the string representation of the name or numeric value of one or more enumerated values to an equivalent enumerated object. In case of success the return value is  and parsed enum is returned in result parameter.
Top
See Also

Reference