| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 426 人关注过本帖
标题:jhgf
只看楼主 加入收藏
seaice420
Rank: 1
等 级:新手上路
帖 子:23
专家分:0
注 册:2006-2-26
收藏
 问题点数:0 回复次数:1 
jhgf

请高手看看什么毛病!!!
小弟感知不禁!!!!
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace jiadang
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
long oper1, oper2, result;
if ((textBox1.Text == "") || (textBox2.Text == ""))
{
MessageBox.Show(this, "操作数不能为空", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
try
{
oper1 = Convert.ToInt64(textBox1.Text);
oper2 = Convert.ToInt64(textBox2.Text);
result = oper1 + oper2;
textBox3.Text = Convert.ToString(result);
}
catch (Exception e1)
{
MessageBox.Show(this, e1.Message, "警告信息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}}

private void buttonExit_Click(object sender, System.EventArgs e)
{
this.Close();
}
}
}

搜索更多相关主题的帖子: jhgf 
2006-03-31 21:22
moderndai
Rank: 1
等 级:新手上路
帖 子:104
专家分:0
注 册:2006-1-25
收藏
得分:0 
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace jiadang
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
long oper1, oper2, result;
if ((textBox1.Text == "") || (textBox2.Text == ""))
{
MessageBox.Show(this, "操作数不能为空", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
try
{
oper1 = Convert.ToInt64(textBox1.Text);
oper2 = Convert.ToInt64(textBox2.Text);
result = oper1 + oper2;
textBox3.Text = Convert.ToString(result);
}
catch (Exception e1)
{
MessageBox.Show(this, e1.Message, "警告信息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}/////这边吧

private void buttonExit_Click(object sender, System.EventArgs e)
{
this.Close();
}
}
}


ROCK AND ROCK PROGRAMING dai--yl@&&espricle@
2006-03-31 22:42
快速回复:jhgf
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014770 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved