NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Enum.IsDefined

Determines if a given value (string, value or instance) is one of the defined values of the specified enumeration.

[Visual Basic]
Public Shared Function IsDefined( _
   ByVal enumType As Type, _
   ByVal value As Object _
) As Boolean
[C#]
public static bool IsDefined(
   Type enumType,
   object value
);
[C++]
public: static bool IsDefined(
   Type* enumType,
   Object* value
);
[JScript]
public static function IsDefined(
   enumType : Type,
   value : Object
) : Boolean;

Parameters

enumType
The enumeration in which to search for the value.
value
[To be supplied.]

Return Value

true if value is one of the defined values of enumType; otherwise, false.

Exceptions

Exception Type Condition
ArgumentNullException The enumType or value parameter is a null reference (in Visual Basic Nothing).
ArgumentException The enumType parameter is not an Enum type.

The value is from an enumeration that differs in type from enumType.

The type of value is not an underlying type of, enumType.

ExecutionEngineException The enumeration has an unsupported underlying type.

See Also

Enum Class | Enum Members | System Namespace