- //遍历窗体上所有CheckBox控件 .net winform
- StringBuilder sb = new StringBuilder();
- foreach (Control c in Controls)
- {
- if (c is CheckBox)
- {
- if (((CheckBox)c).Checked == true )
- {
- sb.Append("," );
- sb.Append(c.Text.ToString());
- }
- }
- }
- sb.Append("," );
- textBox1.Text = sb.ToString();
遍历窗体上所有CheckBox控件 .net winform
最新推荐文章于 2022-03-10 12:17:47 发布