Collections Collections
Collections Collections
DocFX + Singulink = ♥

Search Results for

    Method TryInsertAfter

    TryInsertAfter(T, T, IEqualityComparer<T>?)

    Searches the list for the first value that is equal to existingValue and adds value after it.

    Declaration
    public WeakList<T>.Node? TryInsertAfter(T existingValue, T value, IEqualityComparer<T>? comparer = null)
    Parameters
    Type Name Description
    T existingValue

    The value to search for.

    T value

    The value to add.

    IEqualityComparer<T> comparer

    The comparer to use to determine equality, or null to use the default comparer.

    Returns
    Type Description
    WeakList<T>.Node

    The node that was added, or null if existingValue was not found in the list.

    Remarks

    This operation enumerates the list, so it takes O(n) time plus the cost of the comparisons. Nodes added by other threads during the search are not considered.

    Exceptions
    Type Condition
    ArgumentNullException

    value is null.

    ObjectDisposedException

    The list has been disposed.

    © Singulink. All rights reserved.