Table of Contents

IsEnum Method

Definition

Namespace
Cuemon
Assemblies
Cuemon.Kernel.dll
Source
src/Cuemon.Kernel/Condition.cs

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

value string

The string containing the name or value used to attempt to construct an Enum.

setup Action<EnumStringOptions>

The EnumStringOptions which may be configured.

Returns

bool

true if the specified value is a valid enumeration; otherwise, false.

Type Parameters

T

The type of the enumeration to validate.