Search Results for

    Show / Hide Table of Contents

    Class EnumerableComparer<T>

    An element-wise equality comparer for sequences of values.

    Inheritance
    object
    EnumerableComparer<T>
    Implements
    IEqualityComparer<IEnumerable<T>>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Flame.Collections
    Assembly: Flame.dll
    Syntax
    public sealed class EnumerableComparer<T> : IEqualityComparer<IEnumerable<T>>
    Type Parameters
    Name Description
    T

    The type of the elements in the sequences to compare.

    Constructors

    | Edit this page View Source

    EnumerableComparer(IEqualityComparer<T>)

    Creates an equality comparer for sequences from an equality comparer for elements.

    Declaration
    public EnumerableComparer(IEqualityComparer<T> elementComparer)
    Parameters
    Type Name Description
    IEqualityComparer<T> elementComparer

    Fields

    | Edit this page View Source

    Default

    An instance of an enumerable comparer based on the default element comparer.

    Declaration
    public static readonly EnumerableComparer<T> Default
    Field Value
    Type Description
    EnumerableComparer<T>

    Properties

    | Edit this page View Source

    ElementComparer

    Gets the equality comparer for sequence elements.

    Declaration
    public IEqualityComparer<T> ElementComparer { get; }
    Property Value
    Type Description
    IEqualityComparer<T>

    The equality comparer for elements.

    Methods

    | Edit this page View Source

    Equals(IEnumerable<T>, IEnumerable<T>)

    Tests if two sequences of values are equal.

    Declaration
    public bool Equals(IEnumerable<T> x, IEnumerable<T> y)
    Parameters
    Type Name Description
    IEnumerable<T> x

    The first sequence to test.

    IEnumerable<T> y

    The second sequence to test.

    Returns
    Type Description
    bool

    true if the sequences are equal element-wise; otherwise, false.

    | Edit this page View Source

    GetHashCode(IEnumerable<T>)

    Hashes a sequence of values.

    Declaration
    public int GetHashCode(IEnumerable<T> obj)
    Parameters
    Type Name Description
    IEnumerable<T> obj

    The sequence to hash.

    Returns
    Type Description
    int

    A hash code for the sequence.

    Implements

    IEqualityComparer<T>
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX