Search Results for

    Method RemoveAll

    RemoveAll<T>(List<T>, List<T>, Func<T, T, bool>)

    Removes all elements from the target list that satisfy the specified condition, using elements from the data list for comparison.

    Declaration
    public static void RemoveAll<T>(this List<T> targetList, List<T> dataList, Func<T, T, bool> condition)
    Parameters
    Type Name Description
    List<T> targetList

    The list to remove elements from.

    List<T> dataList

    The list of elements to compare against.

    Func<T, T, bool> condition

    The condition that must be satisfied for an element to be removed.

    Type Parameters
    Name Description
    T

    The type of the elements in the lists.

    Remarks

    This method removes each element in the target list for which the condition is true when compared against each element in the data list. This method modifies the target list.

    In This Article