IsDefined()

Enum::IsDefined(E) method

Determines whether the specified value is a member of enumeration type E.

static bool System::Enum<E, Guard>::IsDefined(E value)

Arguments

ParameterTypeDescription
valueEThe value to check

Return Value

True if value is a member of enumeration E, otherwise - false

Enum::IsDefined(T) method

Determines whether the specified value is a member of enumeration type T.

template<class T> static std::enable_if<std::is_convertible<T, UnderlyingType>::value, bool>::type System::Enum<E, Guard>::IsDefined(T value)

Arguments

ParameterTypeDescription
valueTThe value to check

Return Value

True if value is a member of enumeration T, otherwise - false

Enum::IsDefined(const String&) method

Determines if the value with the specified name is among members of enum E.

static bool System::Enum<E, Guard>::IsDefined(const String &name)

Arguments

ParameterTypeDescription
nameconst String&The name to check

Return Value

True if a member of enum E with the specified name exists.

See Also