Table of Contents

Method ComparisonByText

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

ComparisonByText(FileListBoxItem, FileListBoxItem)

Compares two FileListBoxItem objects based on their folder status and text values.

public static int ComparisonByText(FileListBoxItem x, FileListBoxItem y)

Parameters

x FileListBoxItem

The first FileListBoxItem to compare. Cannot be null.

y FileListBoxItem

The second FileListBoxItem to compare. Cannot be null.

Returns

int

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

  • Less than zero if x precedes y.
  • Zero if x and y are equal.
  • Greater than zero if x follows y.

Remarks

The comparison prioritizes folder status, ensuring folders are ordered before non-folders. If both items have the same folder status, their Text values are compared using a case-insensitive, ordinal string comparison.