I need to obtain the fractional part of a double. AFAIK C# and .NET has no such function.
Have a few options here:(x is a double) x - (int)x x - Math.Truncate(x)
Convert to a string and extract the fraction...
Perhaps someone knows other options?
Which should I choose or does it not matter that much?
Thanks in advance for some answers. :)
I know it's been solved, but can I ask, would something like .ToString("N0"). That would return the number as a string, and chop off the decimal and everything past it (it won't handle rounding though, but I think some of the other number formats can do that, this explains it all Standard Numeric Format Strings)
Of course this is assume I read this right (the original post that is)