I want to parse a fraction stored in a string(e.g. "2/13") to a double. I can write the parsing code but my only question is where should this code go. Best would be if I could use double.Parse() function for this purpose. Is it possible to do it? If double.Parse() can't be used as it is how about writing an extension method? Or any other way?
I don't want to write a Fraction class because the conversion from the string representation of fraction to double is going to be a one time operation(when the user first enters it) and after that the fraction string will be discarded.