Something like:
void DoSomething(Thing thing, bool withLogging, bool withRollBack){}
which would then be called with:
DoSomething(myThing, true,false);
Looking at that, it's hard to tell whether it's logging without rollback, or rollingback but not logging.
However, the overhead of creating additional enumerations is enough that it puts people off of creating them most of the time. If there was a simple inline declaration format then this would be greatly simplified, and much more likely to be used:
void DoSomething(Thing thing, enum logging{Yes,No}, enum rollBack{Never, OnFailure}){}
which would then be called with:
DoSomething(myThing, logging.Yes, rollback.Never);
Which I think we can all agree is a lot clearer than:
DoSomething(myThing, true,false);
Original post on Dreamwidth - there are