请高手解释下,这个方法的含义
private void ControlInfo(Boolean B)
{
foreach (Control ct in this.groupBox1.Controls)
{
if (ct is TextBox)
{
if (B)
{
ct.Enabled = true;
}
else
{
ct.Enabled = false;
}
}
}
}
private void ControlInfo(Boolean B)
{
foreach (Control ct in this.groupBox1.Controls)
{
if (ct is TextBox)
{
if (B)
{
ct.Enabled = true;
}
else
{
ct.Enabled = false;
}
}
}
}
解决方案 »
- 怎么从读取HTML页面的源码并且从特定位置读取内容
- c#调用VC的DLL参数问题
- ----100分----请问各位大哥是怎么写"服务器端的"?
- datagrid的问题,在线急等ing
- 菜鸟的问题:怎么在winform中点击一个button,就可在IE中打开一个窗口显示指定好地址的网页?
- c#中有没有对应java的 Collator 和 RuleBasedCollator 类
- 一个很郁闷的问题,请大家帮我解解啊
- 100分,求该问题如何解决?循环读取控件,添加类里面有控件事件,
- 关于c#编译器的问题
- 为什么vs2005中看不到microsoft.windowsmobile.pocketoutlook
- 视频帧率跟硬件的关系
- 请教一个字符串复制的问题! c#
private void ControlInfo(Boolean B)
{
foreach (Control ct in this.groupBox1.Controls)
{
//遍历groupBox里的控件
if (ct is TextBox)
{
//如果该控件是TextBox
if (B)
{
//这个B是传递过来的参数,是做什么用的只有你才知道,要其它代码才知道
ct.Enabled = true;
//将该控件设为可用
}
else
{
ct.Enabled = false;
//将代码设为不可用
}
}
}
}
{
foreach (Control ct in this.groupBox1.Controls)
{
if (ct is TextBox)
{
ct .Enabled = B //这样不更好?? }
}
}
后面的.Controls是什么意思!!!
求解