WinForm之DataBinding
private void Form2_Load(object sender, EventArgs e)
{
BB b = new BB();
button2.DataBindings.Add("Text", b, "s");
}
class BB
{
public string s { get; set; } = "66666";
}