- using System;
- using System.Windows.Forms;
- class Tutorial1{
-
- static void Main(string[]args){
- //Console.WriteLine("Hello ");
- //MessageBox.Show("Hello~","Message");
-
- int num1=0,num2=0,total=0;
-
- Console.WriteLine("Please Enter the first integer :");
- num1=Int32.Parse(Console.ReadLine());
-
- Console.WriteLine("Please Enter the second integer :");
- num2=Int32.Parse(Console.ReadLine());
-
- total=num1+num2;
-
- Console.WriteLine("The total of {0} and {0} is {0}",num1,num2,total);
-
- }
- }
Please Enter the first integer :
Unhandled Exception: System.ArgumentNullException: Argument cannot be null.
Parameter name: s
at System.Int32.Parse (System.String s) [0x00000] in <filename unknown>:0
at Tutorial1.Main (System.String[] args) [0x00000] in <filename unknown>:0
The application was terminated by a signal: SIGHUP
COmpiler : MonoDevelop
OS platform : ubuntu 10.10 ~~
小第第一天学C# ~这里就stuck 了。。可是 microsoft visual basic 2010 , 可以compiler ~没问题。。。小第 google 好多次了, 有些说 bug ~~
希望这里的朋友指点下。。




