如何能知道panel上有几个button 如题 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 遍历controls或者this.Controls.Find int count = 0; foreach(Control cl in this.panel1.Controls) { if (cl is Button) { count++; } } 遍历一下controls,如果类行为button,i+1。 int c = 0;foreach(Control c in this.Controls) { if(c.GetType()==Type.GetType( "Button ")) { c++; } }return c foreach(Control cl in this.panel1.Controls) { if (cl is Button) { count++; } } 求一个工具 难题又来了!(工作流数据库设计) 这样的代码有化简方法不 关于C#做成系统的问题 怎么判断一个字符串是否是纯数字组成 NHibernate 问题 异地数据库访问 有谁知道如何用模拟窗口显示DirectX的全屏窗口 这个存储过程怎么写?求高人指点. c#问题,请进入指教 asp.net动态增加行的问题 求webform和winform相互通信实例
int count = 0;
foreach(Control cl in this.panel1.Controls)
{
if (cl is Button)
{
count++;
}
}
foreach(Control c in this.Controls)
{
if(c.GetType()==Type.GetType( "Button "))
{
c++;
}
}
return c
{
if (cl is Button)
{
count++;
}
}