1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace ConsoleApp1 8 { 9 class Program 10 { 11 static void Main(string[] args) 12 { 13 String str = "123"; 14 int a = Convert.ToInt32(str); 15 double b = Convert.ToDouble(str); 16 17 Console.WriteLine(a); 18 Console.WriteLine(b); 19 Console.ReadKey(); 20 21 22 23 24 } 25 } 26 }