 | EnumTEnumIsDefined Method |
Returns an indication whether a constant with a specified value exists in a specified enumeration.
Namespace: BobsAssembly: Bobs.Utilities (in Bobs.Utilities.dll) Version: 0.1.0-dev001
Syntaxpublic static bool IsDefined(
Object value
)
Public Shared Function IsDefined (
value As Object
) As Boolean
public:
static bool IsDefined(
Object^ value
)
static member IsDefined :
value : Object -> bool
Parameters
- value
- Type: SystemObject
The value or name of a constant in TEnum.
Return Value
Type:
Booleantrue if a constant in
TEnum has a value equal to value; otherwise, false.
ExceptionsException | Condition |
---|
ArgumentNullException | value is null. |
ArgumentException | The 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