110,534
社区成员
发帖
与我相关
我的任务
分享
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = "1.1";
textBox1.Tag = "1.1111";
}
private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show(textBox1.Text);
}
private void button3_Click(object sender, EventArgs e)
{
MessageBox.Show(textBox1.Tag.ToString());
}
A a = new A { Num = 6.354 };
this.textBox1.DataBindings.Add("Text", a, "Num", true, DataSourceUpdateMode.OnValidation, "0", "F2");
class A
{
public double Num { get; set; }
}