Friday, 19 June 2009

Case insensitive List Contains method

private static bool Contains(List<string> list, string value)
{
bool contains = null != list.Find(delegate(string str)
{
return str.ToLower().Equals(value.ToLower());
});
return contains;
}

No comments:

Post a Comment