◆●用了is为什么还要用as?Textbox temp=null;foreach(Control control in this.Controls){if(control is textbox) temp= control as Textbox; }为什么前面用了is检查了 这里还要用as呢?is检查后 不就确定了类型吗?确定了类
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/21 11:32:09
◆●用了is为什么还要用as?Textboxtemp=null;foreach(Controlcontrolinthis.Controls){if(controlistextbox)temp=cont
◆●用了is为什么还要用as?Textbox temp=null;foreach(Control control in this.Controls){if(control is textbox) temp= control as Textbox; }为什么前面用了is检查了 这里还要用as呢?is检查后 不就确定了类型吗?确定了类
◆●用了is为什么还要用as?
Textbox temp=null;
foreach(Control control in this.Controls)
{
if(control is textbox) temp= control as Textbox;
}
为什么前面用了is检查了 这里还要用as呢?is检查后 不就确定了类型吗?确定了类型 那就不用as转换了啊 直接temp= control 这样不行吗?
◆●用了is为什么还要用as?Textbox temp=null;foreach(Control control in this.Controls){if(control is textbox) temp= control as Textbox; }为什么前面用了is检查了 这里还要用as呢?is检查后 不就确定了类型吗?确定了类
is 可以看做是==的符号,相当于比对
as是赋值
2个单词,在C#中的含义是不同的
◆●用了is为什么还要用as?Textbox temp=null;foreach(Control control in this.Controls){if(control is textbox) temp= control as Textbox; }为什么前面用了is检查了 这里还要用as呢?is检查后 不就确定了类型吗?确定了类
My voice is as hoarse as a raven 还有为什么用AS AS 被这个弄晕S了
He is as a good boy as Tim.为什么要用as a good boy as?
China as she is,is very different from China as she is twenty years ago为什么两个地方都用as she isChina _______,is very different from China ______ twenty years ago.A.as is;as wasB.as she is;as she isC.as she;as sheD.as it is;as it is为什
I think this book is as interesting as that one 为什么要用is在那儿
here is coming the professer and writer as well as his friends为什么用is呢
He's shaving at eight o'clock.句中有动词shaving了 为什么还要用be动词is去掉is.改为He shaving at eight o'clock.
Mo Yan is konwn .a writer.为什么中间用as
He looks as if he is ill为什么用if 、
为什么经过了沉淀、过滤之后,还要用活性炭吸附
I don't think swimming is as interesting as hikingI don‘t think swimming is as interesting as hiking这里swim和hike 为什么用现在进行时
it is hot today ,though not as hot as yesterday为什么hot 用圆形
Jay Chou is famous as a talented singer.为什么不用for,而用as呢?
she is as tall as her mother if not taller 后面为什么用taller
bob is not (as careful as)tom 括号里面的词用对了吗 为什么
The weather is not as well as it was yesterday.为什么用well?
he is at least as tall as you,为什么用least?……
can he buy the car?he is as poor as( can) be.为什么用can