I would like to apply string.Format()
in such a way that it performs truncation instead of rounding. For example
string.Format("##", 46.5); // output is 47, but I want 46
string.Format("##.#", 46.55); // output is 46.6, but I want 46.5
I would like to apply string.Format()
in such a way that it performs truncation instead of rounding. For example
string.Format("##", 46.5); // output is 47, but I want 46
string.Format("##.#", 46.55); // output is 46.6, but I want 46.5
Use Math.Truncate
to truncate before formatting for output