Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Array.IStructuralComparable.CompareTo Method

Determines whether the current collection object precedes, occurs in the same position as, or follows another object in the sort order.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

int IStructuralComparable.CompareTo(
	Object other,
	IComparer comparer
)

Parameters

other
Type: System.Object
The object to compare with the current instance.
comparer
Type: System.Collections.IComparer
An object that compares the current object and other.

Return Value

Type: System.Int32
An integer that indicates the relationship of the current collection object to other, as shown in the following table.

Return value

Description

-1

The current instance precedes other.

0

The current instance and other are equal.

1

The current instance follows other.

Implements

IStructuralComparable.CompareTo(Object, IComparer)

This member is an explicit interface member implementation. It can be used only when the Array instance is cast to an System.Collections.IStructuralComparable interface.

Silverlight

Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft