ABPerson.CompareTo Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CompareTo(ABPerson) |
Compares this instance with the specified
ABPerson and returns an
integer that indicates whether this instance precedes, follows,
or appears in the same position in the sort order as
|
CompareTo(ABPerson, ABPersonSortBy) |
Compares this instance with the specified
ABPerson and returns an
integer that indicates whether this instance precedes, follows,
or appears in the same position in the sort order as
|
CompareTo(ABPerson)
Compares this instance with the specified
ABPerson and returns an
integer that indicates whether this instance precedes, follows,
or appears in the same position in the sort order as
other
.
public int CompareTo (AddressBook.ABPerson other);
abstract member CompareTo : AddressBook.ABPerson -> int
override this.CompareTo : AddressBook.ABPerson -> int
Parameters
Returns
A T:System.Int32 that indicates
whether this instance precedes, follows,
or appears in the same position in the sort order as
other
.
Value | Condition |
---|---|
Less than zero |
This instance precedes other .
|
Zero |
This instance has the same position in the sort order as
other .
|
Greater than zero |
This instance follows other .
|
Implements
Applies to
CompareTo(ABPerson, ABPersonSortBy)
Compares this instance with the specified
ABPerson and returns an
integer that indicates whether this instance precedes, follows,
or appears in the same position in the sort order as
other
(as controlled by ordering
).
public int CompareTo (AddressBook.ABPerson other, AddressBook.ABPersonSortBy ordering);
member this.CompareTo : AddressBook.ABPerson * AddressBook.ABPersonSortBy -> int
Parameters
- ordering
- ABPersonSortBy
A ABPersonSortBy which is used to specify whether ordering should be done by FirstName or LastName.
Returns
A T:System.Int32 that indicates
whether this instance precedes, follows,
or appears in the same position in the sort order as
other
.
Value | Condition |
---|---|
Less than zero |
This instance precedes other .
|
Zero |
This instance has the same position in the sort order as
other .
|
Greater than zero |
This instance follows other .
|