20190410001

        /// <summary>
        /// 遍历控件-Check 全部选中
        /// </summary>
        /// <param name="control">容器控件</param>
        public void CheckBox_Select_all(Control control)
        {
            foreach (Control c in control.Controls)
            {
                if (c is CheckBox)
                {
                    CheckBox Ch = (CheckBox)c;
                    Ch.Checked = true;
                }
            }
        }

原文地址:https://www.cnblogs.com/hutie1980/p/10683298.html