var item = list.Where(t => somecondition);
I would love to be able to find out the index of the element that was returned, in fact, in my case a
If you know you have a list as opposed to something like an IEnumerbale or an IQueryable this might be nice ...
public static int IndexOf(this IList source, Func condition) { for (int i = 0; i < source.Count; i++) if (condition(source[i])) return i; return -1; }