hey, how do I go about taking a two decimal place decimal number and showing it as a fraction? Just in the GUI.Label so value / value would still be fine. :D
asked Feb 19 '11 at 02:34 AM
Multiply it by 100, and then put it over 100.
For example: 0.77 becomes 77/100
string Frac = Convert.ToInt32(MyDecimal*100).ToString()+"/100";
You can attempt to reduce it to it's lowest common denominator if you wish, but thats more work. Not much more, but more.
answered Feb 19 '11 at 03:02 AM