Compare

Navigation:  NxLib API > C# Interface / CLI > NxLibItem >

Compare

Previous pageReturn to chapter overviewNext page

Compare the item's value to a constant. The compare function is available for types int, double, bool and String.

Signatures

Variants throwing exceptions on API errors:

int Compare(int value)

int Compare(double value)

int Compare(bool value)

int Compare(String value)

Variants returning API errors as int parameter:

int Compare(Out int returnCode, int value)

int Compare(Out int returnCode, double value)

int Compare(Out int returnCode, bool value)

int Compare(Out int returnCode, String^ value)

Parameters

returnCode

The error code returned when accessing the item

value

The value to compare the item's value with

Return Value

-1

This item's value is smaller that the constant it was compared with.

0

The values are equal.

1

This item's value is larger than the constant it was compared with.