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";
}

原文地址:https://www.cnblogs.com/usen521/p/12162396.html