Hi,
I am getting the error 'Input String was not in correct format' in the
following C# program (indicated line):
using System;
namespace CF7
{
class CalcArea
{
[STAThread]
static void Main(string[] args)
{
const decimal PI = 3.14159M;
int ch2;
float r;
do
{
Console.Write("Enter Radius: ");
r = Single.Parse(Console.ReadLine());
Console.WriteLine("The Area of circle is: {0}", (float)PI*r*r);
Console.Write("Calculate again (y/n): ");
ch2 = Int32.Parser(Console.ReadLine()); // error
} while((ch2 == 'y') || (ch2 == 'Y'));
}
}
}
[END]
Could please guide me to a solution and an understanding why I
encounter an exception?
Grateful
Mahmood Ahmad