C# 遍历界面的控件并赋值
2021-03-01 03:25
标签:eve foreach ext rgs object end substring sub send private void button2_Click(object sender, EventArgs e) C# 遍历界面的控件并赋值 标签:eve foreach ext rgs object end substring sub send 原文地址:https://www.cnblogs.com/NB571/p/14454516.html
{
foreach (Control cur in Controls)
{
if (cur is TextBox )
{
string name = cur.Name;
cur.Text = name.Substring(name.Length-1,1);
}
}
}