Coding logic methods/functions is a good approach. However, if the simple method/function is only one or two lines of code, and could not be re-use then you needn't to break
Cosmetic
Cause
Inexperienced Developer -Developers lack of experience
Suggested preventive action or Solution
Should use if(str.length <= 0)
For example: Instead of break the SaveToFile to more simple functions (included Save function) public bool SaveToFile(XmlDocument write, string fileName) { //Valid data here and assign value before save //................ //Save to file Save(write, fileName); } private void Save(XmlDocument writer, string fileName) { writer.Save(fileName); } You can call Save method directly from SaveToFile function: public bool SaveToFile(XmlDocument write, string fileName) { //Valid data here and assign value before save //................ writer.Save(fileName); }