I have a style question about overloading methods/constructors. I have a constructor which does something very simple, and then calls a method with some side effects. Sometimes however I don't want the side effects so I made a separate overloaded constructor. I show two versions here. Version 1 is simple: if I pass any bool then TrickyFunction won't be called. But maybe that's confusing, because the value of no_tricks does not affect the behavior (only that no_tricks exists). Version 2 actually does process no_tricks and makes a decision to run TrickyFunction based on that.Which version, or another version, is more stylistically correct?public foo MyFunction(string a){    variable = a    TrickyFunction(a)}#Version 1public foo MyFunction(string a, bool no_tricks){    variable = a}#Version 2public foo MyFunction(string a, bool no_tricks){    variable = a    if (notricks == true)    {        TrickyFunction(a)    }}
Overloading Methods With Different Behavior - Style
c#;coding style;method overloading