- 分享
- 0
- 人气
- 0
- 主题
- 9
- 帖子
- 231
- UID
- 187158
- 积分
- 240
- 阅读权限
- 14
- 注册时间
- 2008-12-20
- 最后登录
- 2013-9-18
- 在线时间
- 157 小时
   
|
- 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);
-
- }
- }
复制代码 Application Output :
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 ~~
希望这里的朋友指点下。。 |
|