比如说要TEXTBOX1内的内容,就只要写TEXTBOX1.text就行了,如果要的数字,就写convert.toint32(textbox1.text)行了
static void Main()
{
Application.Run(new Form1());
}
private void button1_Click(object sender, System.EventArgs e)
{
label1.Text=textBox1.Text;
}
写在按纽事件里自己去看
代码如下:
string a=textbox1.Text
a就是文本框里的值
直接取TextBox中的Text属性就可以了。如:
string name=TextBox1.Text
.Text属性就是取得text的值