Share via


IVsDataObjectMemberComparer.Compare Method

Definition

Overloads

Compare(String, Object[], Int32, Object)

When implemented by a class, compares one object identifier part with another specified object identifier part.

Compare(String, String, Object, Object)

When implemented by a class, compares a property of a data object with another data object property.

Compare(String, Object[], Int32, Object)

When implemented by a class, compares one object identifier part with another specified object identifier part.

public:
 int Compare(System::String ^ typeName, cli::array <System::Object ^> ^ identifier, int identifierPart, System::Object ^ value);
public int Compare (string typeName, object[] identifier, int identifierPart, object value);
abstract member Compare : string * obj[] * int * obj -> int
Public Function Compare (typeName As String, identifier As Object(), identifierPart As Integer, value As Object) As Integer

Parameters

typeName
String

The name of the identifier type.

identifier
Object[]

An array of identifier parts that identify the data object.

identifierPart
Int32

The zero-based index into the identifier array indicating which part of the identifier to compare.

value
Object

A value to compare the identifier part against.

Returns

A value less than zero in cases where the identifier part is less than the specified value; zero if the identifier part is equal to the specified value; a value greater than zero if the identifier part is greater than the specified value.

Applies to

Compare(String, String, Object, Object)

When implemented by a class, compares a property of a data object with another data object property.

public:
 int Compare(System::String ^ typeName, System::String ^ propertyName, System::Object ^ value1, System::Object ^ value2);
public int Compare (string typeName, string propertyName, object value1, object value2);
abstract member Compare : string * string * obj * obj -> int
Public Function Compare (typeName As String, propertyName As String, value1 As Object, value2 As Object) As Integer

Parameters

typeName
String

The name of an object type.

propertyName
String

The name of a property to compare.

value1
Object

The first value to compare.

value2
Object

The second value to compare.

Returns

A value less than zero if the identifier part is less than the specified value; zero if the identifier part is equal to the specified value; a value greater than zero if the identifier part is greater than the specified value.

Applies to