Xojo.Core.Dictionary.CompareKeys

From Xojo Documentation

Event


Xojo.Core.Dictionary.CompareKeys(lhs As Auto, rhs As Auto) As Integer

Supported for all project types and targets.

Implement this event handler if you would like the Dictionary to support case-sensitive keys.

Parameters

Parameter Description
lhs The left-hand side of the comparison.
rhs The right-hand side of the comparison.

Returns

Return a positive integer if lhs is greater than rhs.

Return 0 if lhs is the same as rhs.

Return a negative integer if lhs is less than rhs.

Sample Code

This code does a case-sensitive comparison of the text value of the specified keys:

Var lhsText As Text = lhs
Var rhsText As Text = rhs
Return lhsText.Compare(rhsText, Text.CompareCaseSensitive)