I find that when I add a switch to an already simple method, I would use an optional parameter like
public List<Stuff> GetItems (Guid stuffID, bool includeDeleted = false) {
The advantage is that the GetItems method could already be widely used in other areas of the application, and you do not want you to add and add your own parameters for each use.
Optional parameters become a problem when you have a method with a lot of parameters and control that is optional and that doesn't start working. In this case, you need to start specifying the parameters that you provide. I find it a bit of a mess
Anything more complicated than the above example should really use overloads. I cannot come up with any example where I would use more than one optional parameter.
source share