if(someBoolTest()) dothis()
else dothat();
or just
if(someBoolTest()) dothis();
Wouldn't it be nice to do something like:
someBoolTest() => {dothis(),dothat()}
or
someBoolTest() => dothis()
Is this done in other languages? How do we do this in C#? (I don't think we can, so then why not?)
EDIT: I am aware of ternary ops, but that doesn't make it look any better. Would be nice to do this with some form of lambda with delegates..