Website may be up and down over next few months. I'm currently doing a complete overhaul of everything. Going back to simple individual .htm pages, new overall site theme, sanitizing and cleaning up html of all pages and blog posts, attempting to implement a new tooling and publishing system etc etc.

 

/// <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))
        {
            list.RemoveAt(i);
        }
    }
}

Add comment



biuquote
  • Comment
  • Preview
Loading






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