An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top