Class Comparer
Represents the class that defines the comparer by implementing the IComparer.
Implements
Inherited Members
Namespace: Syncfusion.Maui.Data
Assembly: Syncfusion.Maui.Data.dll
Syntax
public sealed class Comparer : IComparer
Constructors
Comparer(CultureInfo)
Initializes a new instance of the Comparer class.
Declaration
public Comparer(CultureInfo culture)
Parameters
| Type | Name | Description |
|---|---|---|
| CultureInfo | culture | The culture info of the comparer initialized. |
Properties
Default
Gets the default comparer with the culture info as current culture.
Declaration
public static Comparer Default { get; }
Property Value
| Type |
|---|
| Comparer |
DefaultInvariant
Gets the default invariant comparer with the culture info as invariant culture.
Declaration
public static Comparer DefaultInvariant { get; }
Property Value
| Type |
|---|
| Comparer |
Methods
Compare(object, object)
Compares the given two objects.
Declaration
public int Compare(object obj1, object obj2)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj1 | The object 1. |
| object | obj2 | The object 2. |
Returns
| Type | Description |
|---|---|
| int | The value indicating the comparison of the given two objects. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Object should implement IComparable |