double tmin, minmax = 0;
Stopwatch timer = new Stopwatch();
timer.Start();
...
timer.Stop();
tmin = timer.Elapsed.TotalMinutes
minmax += tmin;
timer.Reset();
Let's say there are about 3 loops, which would normaly result in a 'double' type value of 'minmax' at something 3.593xxx
I want to output the value of 'minmax' on-screen with only the numbers BEFORE the "." symbol..
This is what i tried to use:
Console.WriteLine("Total Minutes: {0:F0", minmax)
But it would only result in an appromaximate '~' conversion of the whole value before the "." sign - meaning IF there is a anything <5 after the dot, then i will get a 1 point higher value overall, hence .5 (in this example i would've gotten a '4', instead of a 3, which is what i need)
I tried to convert minmax to a string and then simply removing anything after the "." sign, but that didn't work either, since sometimes minmax IS actually a 0, but declaring minmax initialy as 0.0 and keeping it's value as 0.0 is not possible, since the compiler simply assigns a single 0 to it.. WHICH means, that i am going to get an error, when trying to remove pointless chars with a command of this syntax - string.Remove(string.IndexOf(".")), since there is no dot (.) present..
Any ideas?