Is there any harm or benefit for having instance methods call static methods to do their work?
If your confused by what I mean, take a look at the example code below. StripFormatting is an instance method and static method. If another developer creates an instance of PhoneUtil then all that is needed is for the StripFormatting method to be called on the instance of the object. If a developer decides not to create an instance of PhoneUtil they can call the static method except this method has a parameter for the PhoneNumber.
public string StripFormatting()
{
return PhoneUtil.StripFormatting(this.PhoneNumber);
}
public static string StripFormatting(string psPhoneNumber)
{
string tsPhoneNumber = psPhoneNumber;
Regex toNotDigit = new Regex("\\D+");
tsPhoneNumber = toNotDigit.Replace(tsPhoneNumber, "");
return tsPhoneNumber;
}