DataObjectItemComparer.Compare Method

Definition

Overloads

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

Compares one object identifier part with another specified object identifier part.

Compare(String, String, Object, Object)

Compares a property of a data object with another data object property.

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

Compares one object identifier part with another specified object identifier part.

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

Parameters

typeName
String

The name of an object type.

identifier
Object[]

The identifier of an object of the type specified by typeName parameter.

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

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

Exceptions

The typeName and/or identifier parameter is null.

The identifier parameter is less than zero or greater than or equal to the number of elements in the identifier array.

Applies to

Compare(String, String, Object, Object)

Compares a property of a data object with another data object property.

public:
 virtual int Compare(System::String ^ typeName, System::String ^ propertyName, System::Object ^ value1, System::Object ^ value2);
public virtual int Compare (string typeName, string propertyName, object value1, object value2);
abstract member Compare : string * string * obj * obj -> int
override this.Compare : string * string * obj * obj -> int
Public Overridable 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

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

Exceptions

The typeName and/or propertyName parameter is null.

Applies to