Possible Duplicate:
Static extension methods
So I know that Extension methods are for object instances only as in doing
public static string stringBig(this string inString) {
return inString.ToUpper();
}
Only works for an instance of string
However I am trying to make something that function like Double.TryParse
so that I don't have to do
Double myDouble = someOtherDouble.DoubleParseDifferent("4.324802348203498");
I'd like to be able to do something like
Double myDouble = Double.DoubleParseDifferent(someRandomString);
Now I know that I can't actually do this so what would be some alternative methods or ways I could approach this.