Skip to content

Instantly share code, notes, and snippets.

@jrwren
Created June 28, 2011 15:16
Show Gist options
  • Save jrwren/1051362 to your computer and use it in GitHub Desktop.
Save jrwren/1051362 to your computer and use it in GitHub Desktop.
not smart I.f so i can => I.f( pred, do)
public static class I { public static void f(Func<bool> pred, Action a) { if (pred()) a(); } }
// so that I can use it like this:
dg.CurrentCellChanged += (_, __) =>
I.f(()=>rowBeingEdited!=null, ()=>rowBeingEdited.EndEdit())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment