Table of Contents

Method Compare

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Compare(ListControlItem?, ListControlItem?)

Compares two ListControlItem objects and returns a value indicating their relative order.

public static int Compare(ListControlItem? x, ListControlItem? y)

Parameters

x ListControlItem

The first ListControlItem to compare. Can be null.

y ListControlItem

The second ListControlItem to compare. Can be null.

Returns

int

A signed integer that indicates the relative order of the objects being compared:

  • 0 if both x and y are null or equal.
  • -1 if x is null or precedes y in the sort order.
  • 1 if y is null or precedes x in the sort order.

Remarks

This method uses the CompareTo(ListControlItem?) method to determine the relative order of non-null items.