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.CompareTo

Compares the current value to that of an object.

[Visual Basic]
Overridable Public Function CompareTo( _
   ByVal target As Object _
) As Integer
[C#]
public virtual int CompareTo(
   object target
);
[C++]
public: virtual int CompareTo(
   Object* target
);
[JScript]
public function CompareTo(
   target : Object
) : int;

Parameters

target
The object to compare against.

Return Value

A number represtenting the relationship:

Return Value Description
-1 The value of this instance is less than the value of target.
0 The value of this instance is equal to the value of target.
1 The value of this instance is greater than the value of target.

Exceptions

Exception Type Condition
ArgumentNullException The target parameter is a null reference (in Visual Basic Nothing).
ArgumentException The object is from an enumeration that differs in type from enumType.
ExecutionEngineException The underlying type of this enumeration is unsupported.

Remarks

If target is not an enumeration type, it is converted to a type compatible with the underlying type of this enumeration before comparison.

See Also

Enum Class | Enum Members | System Namespace