Y
.YC
Hi, I was trying on the following code n I got an exception. Can anyone tell
me whats wrong?
using System;
namespace Module_2
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Write
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
Console.WriteLine("Exponential formatting - {0:E}", 888.8);
Console.WriteLine("Fixed-point formatting - {F3}", 888.8888);
Console.WriteLine("General formatting - {0:G}", 88.888); //I got
stuck here..
Console.WriteLine("Number formatting - {0:N}", 8888888.8);
Console.WriteLine("Hexadecimal formatting - {0:x4}", 88);
Console.ReadLine();
}
}
}
The message:
An unhandled exception of type 'System.FormatException' occurred in
mscorlib.dll
Additional information: Input string was not in a correct format.
TQ
YC
me whats wrong?
using System;
namespace Module_2
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Write
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
Console.WriteLine("Exponential formatting - {0:E}", 888.8);
Console.WriteLine("Fixed-point formatting - {F3}", 888.8888);
Console.WriteLine("General formatting - {0:G}", 88.888); //I got
stuck here..
Console.WriteLine("Number formatting - {0:N}", 8888888.8);
Console.WriteLine("Hexadecimal formatting - {0:x4}", 88);
Console.ReadLine();
}
}
}
The message:
An unhandled exception of type 'System.FormatException' occurred in
mscorlib.dll
Additional information: Input string was not in a correct format.
TQ
YC