using System;
public class NumParsingApp
{
public static void Main(string[] args)
{
int i = int.Parse("12345");
Console.WriteLine("i = {0}", i);
int j = Int32.Parse("12345");
Console.WriteLine("j = {0}", j);
double d = Double.Parse("1.2345E+6");
Console.WriteLine("d = {0:F}", d);
string s = i.ToString();
Console.WriteLine("s = {0}", s);
}
}
|