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;
}

Comments

Popular posts from this blog

Tibco Rendezvous (tibrv) C# .Net example

Parse XML to dynamic object in C#