You can maintain compatibility if you stop using additional parameters and use method overloading instead:
public void GetData(int p1, string p2, object p3, bool p4 = false, bool p5 = false) {
becomes
public void GetData(int p1, string p2, object p3) { GetData(p1, p2, p3, false); } public void GetData(int p1, string p2, object p3, bool p4) { GetData(p1, p2, p3, p4, false); } public void GetData(int p1, string p2, object p3, bool p4, bool p5) {
However, this will not affect changing the default value unless you recompile all projects. For example, any old GetData(1, "2", null) will always call the new GetData(1, "2", null, false) , even if you change
public void GetData(int p1, string p2, object p3) { GetData(p1, p2, p3, false); }
to
public void GetData(int p1, string p2, object p3) { GetData(p1, p2, p3, true); }