标题: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



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-54244-1-1.html




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

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