/// <summary>Removes any items in a list that match a criteria</summary>
/// <param name="list">The list.</param>
/// <param name="predicate">The callback used to determine weather or not the item in the list should be removed.</param>
/// <exception cref="ArgumentNullException"><paramref name="predicate"/> is <see langword="null"/></exception>
public static void RemoveAny(this IList list,  Predicate<object> predicate )
    if (predicate == null)
        throw new ArgumentNullException("predicate");

    for (var i = list.Count - 1; i >= 0; i--)
        var item = list[i];
        if (predicate(item))

Add comment

  • Comment
  • Preview

Created by: X

Just another personal website in this crazy online world

Name of author Dean Lunz (aka Created by: X)
Computer programming nerd, and tech geek.
About Me -- Resume