Partilhar via


AdoDotNetObjectItemComparer.Compare(String, Object[], Int32, Object) Method

Definition

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

public:
 override int Compare(System::String ^ typeName, cli::array <System::Object ^> ^ identifier, int identifierPart, System::Object ^ value);
public override int Compare (string typeName, object[] identifier, int identifierPart, object value);
override this.Compare : string * obj[] * int * obj -> int
Public Overrides 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