asp.net.ph

Boolean.CompareTo Method

System Namespace   Boolean Class


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

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

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

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

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

Parameters

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

Return Value

A signed integer that indicates the relative order of this instance and obj.

Return Value Condition
Less than zero This instance is false and obj is true.
Zero This instance and obj are equal ( either both are true or both are false ).
Greater than zero This instance is true and obj is false.

-or-

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


Exceptions


Exception Type Condition
ArgumentException obj is not a Boolean or a null reference ( Nothing in Visual Basic ).

Remarks

obj must be a null reference ( Nothing in Visual Basic ) or an instance of Boolean; otherwise, an exception is thrown.

This method is implemented to support the IComparable interface.

See Also

Boolean Members   Equals   Object 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