For example, I have a number 0,000000005 and it's displayed in ListBox like 5E-09. So, I would like it to be displayed exactly 0,000000005. Is there any way to do that? Thanx a lot.
listView1.Items[i].SubItems.Add(Convert.ToString(0.000000005));
For example, I have a number 0,000000005 and it's displayed in ListBox like 5E-09. So, I would like it to be displayed exactly 0,000000005. Is there any way to do that? Thanx a lot.
listView1.Items[i].SubItems.Add(Convert.ToString(0.000000005));
Use a format specifier, like in your case:
listView1.Items[i].SubItems.Add(String.Format("{0:F9}", 0.0000005));
Generic examples:
double v = 17688.65849;
double v2 = 0.15;
int x = 21;
Console.WriteLine("{0:F2}", v); // 17688.66
Console.WriteLine("{0:N5}", v); // 17, 688.65849
Console.WriteLine("{0:e}", v); // 1.768866e+004
Console.WriteLine("{0:r}", v); // 17688.65849
Console.WriteLine("{0:p}", v2); // 15.00 %
Console.WriteLine("{0:X}", x); // 15
Console.WriteLine("{0:D12}", x); // 000000000021
Console.WriteLine("{0:C}", 189.99); // $189.99