Click or drag to resize
EnumTEnumIsDefined Method
Returns an indication whether a constant with a specified value exists in a specified enumeration.

Namespace: Bobs
Assembly: Bobs.Utilities (in Bobs.Utilities.dll) Version: 0.1.0-dev001
Syntax
public static bool IsDefined(
	Object value
)

Parameters

value
Type: SystemObject
The value or name of a constant in TEnum.

Return Value

Type: Boolean
true if a constant in TEnum has a value equal to value; otherwise, false.
Exceptions
ExceptionCondition
ArgumentNullExceptionvalue is null.
ArgumentExceptionThe type of value is an enumeration, but it is not an enumeration of type TEnum.-or- The type of value is not an underlying type of TEnum.
InvalidOperationException value is not type System.SByte, System.Int16, System.Int32, System.Int64, System.Byte, System.UInt16, System.UInt32, or System.UInt64, or System.String.
See Also