IsEnum Method
Definition
IsEnum<T>(string, Action<EnumStringOptions>)
Determines whether the specified value is valid by attempting to construct an enumeration of T.
public static bool IsEnum<T>(string value, Action<EnumStringOptions> setup = null) where T : struct, IConvertible
Parameters
valuestringThe string containing the name or value used to attempt to construct an Enum.
setupAction<EnumStringOptions>The EnumStringOptions which may be configured.
Returns
- bool
trueif the specifiedvalueis a valid enumeration; otherwise,false.
Type Parameters
TThe type of the enumeration to validate.