if I have a function like
public void usefulUtility(parameters...) {
string c = "select * from myDB";
do_a_database_call(c);
}
that’s used in alot of places, is there any possible harm in changing it to:
public bool usefulUtility(parameters...) {
string c = "select * from myDB";
bool result = do_a_database_call(c);
return result;
}
Could this possibly break any code?
I can’t think of anything… but it may be possible?
Yes, virtually anything that you could possibly do that affects your public interface is a breaking change. It could be small enough that you don’t care, and that nobody, or almost nobody, will actually happen to hit the corner cases, but Eric Lippert explains that there are edge cases (many of which involve Type inference) that can cause even these seemingly innocuous changes to break.
For your particular example, this code would be broken by that change.