'那么'是可选的吗?!? [英] 'Then' is Optional?!?
问题描述
VS.NET 2003,带有Option Strict的ASP.NET项目开启。
(是的,我知道这不是aspnet组。这是一个VB语法的东西,不是
一个ASP.NET的东西)
这实际上是在没有Then的情况下编译的。关键词。什么给了?!?
如果不是Page.IsPostBack
结束如果
-
Peace&快乐的计算,
Mike Labosh,MCSD
当你杀了一个男人时,你就是凶手。
杀死很多人,你就是征服者。
杀死所有人,你就是上帝了。 - Dave Mustane
VS.NET 2003, ASP.NET Project with Option Strict turned ON.
(yes, I know this is not the aspnet group. This is a VB syntax thing, not
an ASP.NET thing)
This actually compiles without the "Then" keyword. What gives?!?
If Not Page.IsPostBack
End If
--
Peace & happy computing,
Mike Labosh, MCSD
"When you kill a man, you''re a murderer.
Kill many, and you''re a conqueror.
Kill them all and you''re a god." -- Dave Mustane
推荐答案
迈克
再看看,,,然后惊喜有你的
然而,当我离开页面并返回
时,就在我的情况下,甚至当我跳到同一类中的另一部分时VB添加了然后
自动声明
这就是发生的事情
问候
Michel Posseth [MCP ]
" Mike Labosh" <毫升***** @ hotmail.com>在消息中写道
news:或************** @ TK2MSFTNGP11.phx.gbl ...
Mike
Look again ,,, and surprise there is your then
however there it was in my situation as soon as i leave the page and return
or even when i jump to another part in the same class VB adds the Then
statement automaticly
so that is what is happening
Regards
Michel Posseth [MCP]
"Mike Labosh" <ml*****@hotmail.com> wrote in message
news:Or**************@TK2MSFTNGP11.phx.gbl...
VS.NET 2003,选项Strict的ASP.NET项目打开。
(是的,我知道这不是aspnet组。这是一个VB语法的东西,而不是ASP.NET的东西)
这实际上是在没有然后的情况下编译的。关键词。什么给了?!?
如果不是Page.IsPostBack
结束如果
-
和平&快乐的计算,
Mike Labosh,MCSD
当你杀死一个男人时,你是一个凶手。
杀了很多人,你就是一个征服者。
杀死他们,你就是上帝。 - Dave Mustane
VS.NET 2003, ASP.NET Project with Option Strict turned ON.
(yes, I know this is not the aspnet group. This is a VB syntax thing, not
an ASP.NET thing)
This actually compiles without the "Then" keyword. What gives?!?
If Not Page.IsPostBack
End If
--
Peace & happy computing,
Mike Labosh, MCSD
"When you kill a man, you''re a murderer.
Kill many, and you''re a conqueror.
Kill them all and you''re a god." -- Dave Mustane
Mike,
Mike,
如果不是Page.IsPostBack
结束如果
If Not Page.IsPostBack
End If
这是我的一个愿望,同时让那些毫无意义的''Dim''可选
: - )
Cor
This is one of my wishes, together with making that senseless ''Dim'' optional
:-)
Cor
是的,我认为它是可选的,但正如迈克指出的那样,IDE将会是
为你多次投入。
为什么这是一个大问题?这不是''然后''真的添加任何语法
的含义。 C#和其他语言的if语句没有''then''只需
罚款。难道不是VB那么冗长吗?
" Mike Labosh" <毫升***** @ hotmail.com>在消息中写道
news:或************** @ TK2MSFTNGP11.phx.gbl ...
Yes, I think it is optional, though as was pointed out by Mike, the IDE will
put it in for you many times.
Why is this a big deal? It''s not like ''Then'' is really adding any syntactic
meaning. C# and other languages have if statements without a ''then'' just
fine. Isn''t VB verbose enough as is?
"Mike Labosh" <ml*****@hotmail.com> wrote in message
news:Or**************@TK2MSFTNGP11.phx.gbl...
VS.NET 2003,选项Strict的ASP.NET项目打开。
(是的,我知道这不是aspnet组。这是一个VB语法的东西,而不是ASP.NET的东西)
这实际上是在没有然后的情况下编译的。关键词。什么给了?!?
如果不是Page.IsPostBack
结束如果
-
和平&快乐的计算,
Mike Labosh,MCSD
当你杀死一个男人时,你是一个凶手。
杀了很多人,你就是一个征服者。
杀死他们,你就是上帝。 - Dave Mustane
VS.NET 2003, ASP.NET Project with Option Strict turned ON.
(yes, I know this is not the aspnet group. This is a VB syntax thing, not
an ASP.NET thing)
This actually compiles without the "Then" keyword. What gives?!?
If Not Page.IsPostBack
End If
--
Peace & happy computing,
Mike Labosh, MCSD
"When you kill a man, you''re a murderer.
Kill many, and you''re a conqueror.
Kill them all and you''re a god." -- Dave Mustane
这篇关于'那么'是可选的吗?!?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!