menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class Comparer - UWP API Reference | Syncfusion

    Show / Hide Table of Contents

    Class Comparer

    Represents the class that defines the comparer by implementing the IComparer.

    Inheritance
    System.Object
    Comparer
    Implements
    System.Collections.IComparer
    Namespace: Syncfusion.Data
    Assembly: Syncfusion.Data.UWP.dll
    Syntax
    public sealed class Comparer : Object, IComparer

    Constructors

    Comparer(CultureInfo)

    Initializes a new instance of the Comparer class.

    Declaration
    public Comparer(CultureInfo culture)
    Parameters
    Type Name Description
    System.Globalization.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
    System.Object obj1

    The object 1.

    System.Object obj2

    The object 2.

    Returns
    Type Description
    System.Int32

    The value indicating the comparison of the given two objects.

    Exceptions
    Type Condition
    System.ArgumentException

    Object should implement IComparable

    Implements

    System.Collections.IComparer

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved