fmt <si*******@fmtinv.com> wrote:
I tried
string strReturn=(Rate.ToString()+".00");
string strReturn=(String.Format("{0:F2}%",Rate));
Both return.0.50...
The first shouldn't - and doesn't on either 1.1 or 2.0 on my box:
using System;
class Test
{
static void Main()
{
string x = 0.5.ToString(".00");
Console.WriteLine (x);
}
}
prints out ".50" with both .NET versions.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too