SftTree/NET 2.0

Compare Method, SortAscending Class

Softel vdm, Inc.

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

Syntax      SortAscending Class (Softelvdm.SftTreeNET)

VB   

Public Overridable NotOverridable Function Compare( _
     ByVal x As Object, _
     ByVal y As Object _
  ) As Integer

C#   

public virtual final int Compare(
     object x,
     object y );

C++   

public: virtual int Compare(
     Object^ x,
     Object^ y ) sealed;

x

The first object to compare. This object can be cast into an ItemClass object.

y

The second object to compare. This object can be cast into an ItemClass object.

Return Value

The collating sequence. Return a value greater than zero to indicate that x is greater than y, equal to 0 to indicate that x and y are equal, a value less than zero to indicate x is less than y.

Comments

The Compare method compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.


Feedback / comments / error reports for this topic
© 2007 - Softel vdm, Inc. - www.softelvdm.com