using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace job1_01
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int a,b;
label2.Text = "=";
a = int.Parse(textBox1.Text);
b = int.Parse(textBox2.Text);
label2.Text += a + b;
}
}
}//截图在回复区c#
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace job1_01
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int a,b;
label2.Text = "=";
a = int.Parse(textBox1.Text);
b = int.Parse(textBox2.Text);
label2.Text += a + b;
}
}
}//截图在回复区c#
解决方案 »
- 现在公司不忙 整天闲着(觉得很浪费时间)想快点提高自己 请前辈支招
- 求C#控件重写实例
- 关于编程实现抓某一程序的数据包
- 窗体显示
- FusionCharts无显示
- 在一个asp.net项目中(如myweb),怎么用javascript执行c#写的一个类(如test)
- 当系统扑捉到错误后,怎样才能将该错误清除掉?
- c#在richtextbox中载入word表格
- 在windowsforms中,怎么没有多媒体播放器这个control啊,在delphi中有,好方便的。
- 多谢剔教!!!两个C#程序都要打开同一个二进制文件进行读写,如何设置互斥体得以解决?
- VS2012 TextBox的TextMode的问题
- c# 获取窗口句柄后 如何遍历所有控件
InitializeComponent();
这种东西出现在VS设计窗体时自动生成的,
你没有声明当然编译不过了
vs的所见即所得的ide,会保存用户用鼠标拖拉(就像美工作画一样)来设计的部分。然后那些部分会自动编译为另一个public partial class Form1 : Form
{
private void InitializeComponent()
{
.......
} ................
}
也就是说成千上万行代码是vs自动生成的。如果你那么喜欢手动写代码,喜欢死抠一些代码而不喜欢使用高效率的开发工具,那么恐怕还是去学java、专门啃书本比较适合啊。还是下载免费的vs吧!http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-products