Show / Hide Table of Contents

    Class DynamicComparer

    Provides a factory based way to create and wrap an System.Collections.Generic.IComparer<T> implementation.

    Inheritance
    System.Object
    DynamicComparer
    Namespace: Cuemon.Collections.Generic
    Assembly: Cuemon.Core.dll
    Syntax
    public static class DynamicComparer

    Methods

    | Improve this Doc

    Create<T>(Func<T, T, Int32>)

    Creates a dynamic instance of an System.Collections.Generic.IComparer<T> implementation wrapping System.Collections.Generic.IComparer<T>.Compare(T, T) through comparer.

    Declaration
    public static IComparer<T> Create<T>(Func<T, T, int> comparer)
    Parameters
    Type Name Description
    System.Func<T, T, System.Int32> comparer

    The function delegate that performs a comparison of two objects of the same type and returns a value indicating whether one object is less than, equal to, or greater than the other.

    Returns
    Type Description
    System.Collections.Generic.IComparer<T>

    A dynamic instance of System.Collections.Generic.IComparer<T> that serves as a sort order comparer for type T.

    Type Parameters
    Name Description
    T

    The type of objects to compare.

    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX