![](https://iknow-base.cdn.bcebos.com/lxb/notice.png)
在C#winform中怎么查看所有用到的控件
3个回答
2012-08-22
展开全部
string str = "";
var source = from temp in Controls.Cast<Control>() group temp by temp.GetType() into g select new { count = g.Count(), type = g.Key.ToString() };
foreach (var t in source)
{
str += t.type + ":" + t.count + "\n";
}
MessageBox.Show(str);
var source = from temp in Controls.Cast<Control>() group temp by temp.GetType() into g select new { count = g.Count(), type = g.Key.ToString() };
foreach (var t in source)
{
str += t.type + ":" + t.count + "\n";
}
MessageBox.Show(str);
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
属性下面的下拉列表
![](http://iknow-zhidao.bdimg.com/static/question-new/widget/value-comment/img/support_10.6efc748.gif?x-bce-process=image/format,f_auto/quality,q_80)
你对这个回答的评价是?
展开全部
菜单栏中的视图中的工具箱可以看到
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询