Collections Collections
Collections Collections
DocFX + Singulink = ♥

Search Results for

    Constructor ComparerEquatableArray

    ComparerEquatableArray(ImmutableArray<T>, IEqualityComparer<T>?)

    Initializes a new instance of the ComparerEquatableArray<T> class that wraps the specified immutable array and uses the specified comparer, or the default comparer if null is specified.

    Declaration
    public ComparerEquatableArray(ImmutableArray<T> array, IEqualityComparer<T>? comparer = null)
    Parameters
    Type Name Description
    ImmutableArray<T> array
    IEqualityComparer<T> comparer
    Remarks

    The values in the array are assumed to be immutable and interchangeable. Equal values must stay equal and keep the same hash code indefinitely, and a value read from the array is only guaranteed to be equal to the one that was passed in, not to be the same instance.

    This constructor wraps the array directly without de-duplicating it against existing instances, although the instance may still be de-duplicated later. Use the methods on ComparerEquatableArray to create de-duplicated instances.

    Comparers are compared by reference when determining whether two arrays are equal, with null treated as equivalent to Default.

    © Singulink. All rights reserved.