How to display '0.5' as '1/2'?
-
hello, can anyone tell me how I can string.format a double to turn a value of 0.5 into 1/2 or, for example 2.0 into 2/1? thanks in advance!
/matthias
I love deadlines. I like the whooshing sound they make as they fly by.
[Douglas Adams] -
hello, can anyone tell me how I can string.format a double to turn a value of 0.5 into 1/2 or, for example 2.0 into 2/1? thanks in advance!
/matthias
I love deadlines. I like the whooshing sound they make as they fly by.
[Douglas Adams]Check out my http://www.codeproject.com/csharp/PIEBALDTypesRational.asp[^]
-
Your article is getting smacked pretty hard. You might want to rewrite it so it explains how these things are done instead of just documenting how to use your library.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
hello, can anyone tell me how I can string.format a double to turn a value of 0.5 into 1/2 or, for example 2.0 into 2/1? thanks in advance!
/matthias
I love deadlines. I like the whooshing sound they make as they fly by.
[Douglas Adams]You might want to have a look at this: http://www.codeproject.com/csharp/fractiion.asp