【新手求教】想知道如何把100个按钮存入控件数组中求推荐个普遍方法[解决办法]遍历窗体组件,将button放入数组,记得别越界啊
Button[] btns = new Button[100];int i = 0;foreach( Control c in this.Controls){ if (c is Button) { btns[i] = c; i++; }}