asp.net.ph

Enum.CompareTo Method

System Namespace   Enum Class


Compares this instance to a specified object and returns an indication of their relative values.

[ VB ]
<Serializable>
NotOverridable Public Function CompareTo ( _
   ByVal target As Object _
) As Integer

[ C# ]
[Serializable]
public int CompareTo (
   object target
);

[ C++ ]
[Serializable]
public: __sealed int CompareTo (
   Object* target
);

[JScript ]
public Serializable
function CompareTo (
   target : Object
) : int;

Parameters

target
An object to compare, or a null reference ( Nothing in Visual Basic ).

Return Value

A signed number indicating the relative values of this instance and target.

Return Value Description
Less than zero The value of this instance is less than the value of target.
Zero The value of this instance is equal to the value of target.
Greater than zero The value of this instance is greater than the value of target.

-or-

target is a null reference ( Nothing in Visual Basic ).


Exceptions


Exception Type Condition
ArgumentException target and this instance are not the same type.
InvalidOperationException This instance is not type SByte, Int16, Int32, Int64, Byte, UInt16, UInt32, or UInt64.

See Also

Enum Members   Equals Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph