Düzenle

Aracılığıyla paylaş


ABPerson.CompareTo Method

Definition

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

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

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

other
ABPerson

The ABPerson to compare to this instance.

Returns

A T:System.Int32 that indicates whether this instance precedes, follows, or appears in the same position in the sort order as other.

ValueCondition
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

other
ABPerson

The ABPerson to compare to this instance.

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.

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

Applies to