C# 遍历界面的控件并赋值
时间:2021-02-27 13:25:40
收藏:0
阅读:0
private void button2_Click(object sender, EventArgs e)
{
foreach (Control cur in Controls)
{
if (cur is TextBox )
{
string name = cur.Name;
cur.Text = name.Substring(name.Length-1,1);
}
}
}
评论(0)