ToEnum Method
Definition
- Namespace
- Cuemon.Extensions
- Assemblies
- Cuemon.Extensions.Core.dll
ToEnum<TEnum>(string, bool)
Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated TEnum.
public static TEnum ToEnum<TEnum>(this string value, bool ignoreCase = true) where TEnum : struct, IConvertible
Parameters
Returns
- TEnum
An enum of type
TEnumwhose value is represented byvalue.
Type Parameters
TEnumThe type of the enumeration to convert.
Exceptions
- ArgumentNullException
valueis null.- ArgumentException
TEnumdoes not represents an enumeration.- ArgumentException
valuedoes not represents an enumeration.
- See Also
-
FromEnum()