Quote:
|
grid.Rows.OfType<DataGridViewRow>().Where( r => r.Cells[1].Value == someValue).ForEach( r => faiQualcosa(r));
|
dove l'ultimo ForEach è un extension method così definito:
Codice:
public static class Exts
{
public static void ForEach<T>(this IEnumerable<T> seq, Action<T> command)
{ foreach(T item in seq) command(item); }
}