我的每一个......因为...事情被打破了 [英] my for each ... as ... thing is broken

查看:48
本文介绍了我的每一个......因为...事情被打破了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道为什么我的VS.Net版本不接受

后面的语法?


For each f As FileInfo In d.GetFiles()

sz + = f.Length

下一页f


我总是必须明确地将变量声明为如下:


Dim f As FileInfo


For each f in d.GetFiles()

sz + = f.Length

下一页f


即使在MSDN在线帮助中给出的示例For ... Next也没有

编译没有错误。我环顾四周寻找一些设置,但是

似乎不是一个,我似乎安装了所有更新。

Does anybody have any idea why my version of VS.Net doesn''t accept the
following syntax?

For Each f As FileInfo In d.GetFiles()
sz += f.Length
Next f

I always have to explicitly declare the variable as follows:

Dim f As FileInfo

For Each f In d.GetFiles()
sz += f.Length
Next f

Even the example given in the MSDN online help on For... Next doesn''t
compile without an error. I looked around for some setting but there
doesn''t seem to be one and I seem to have all the updates installed.

推荐答案

Tom Leylan写道:
Tom Leylan wrote:
有没有人知道为什么我的VS.Net版本不接受
以下语法?

对于每个f作为FileInfo在d.GetFiles()
sz + = f.Length
下一个我需要明确声明变量如下:

Dim f As FileInfo

每个f in d.GetFiles()
sz + = f.Length
下一个f

甚至在MSDN在线帮助中给出的示例For ... Next没有编译没有错误。我环顾四周寻找一些设置,但那里似乎并不是一个,我似乎安装了所有更新。
Does anybody have any idea why my version of VS.Net doesn''t accept the
following syntax?

For Each f As FileInfo In d.GetFiles()
sz += f.Length
Next f

I always have to explicitly declare the variable as follows:

Dim f As FileInfo

For Each f In d.GetFiles()
sz += f.Length
Next f

Even the example given in the MSDN online help on For... Next doesn''t
compile without an error. I looked around for some setting but there
doesn''t seem to be one and I seem to have all the updates installed.




我相信是仅限.Net 1.1和vs.net2003的新功能。



I believe that is new feature of .Net 1.1 and vs.net2003 only.


嗨Tom,


VB.net 2003
Hi Tom,

VB.net 2003
For each f As FileInfo in d.GetFiles()
sz + = f.Length
下一页f

我总是要明确声明变量如下:


VB.net 2002 Dim f As FileInfo

For each f in d.GetFiles()
sz + = f。长度
下一个f
For Each f As FileInfo In d.GetFiles()
sz += f.Length
Next f

I always have to explicitly declare the variable as follows:
VB.net 2002 Dim f As FileInfo

For Each f In d.GetFiles()
sz += f.Length
Next f




因此我在使用2003时以VB.net 2002风格提供我的所有示例


很高兴特别帮助你。


Cor



Therefore I give all my examples in VB.net 2002 style while I am using 2003

Happy to help especialy you.

Cor


" Slonocode" < ST *********** @ yahoo.com>写道...
"Slonocode" <st***********@yahoo.com> wrote...
我认为这只是.Net 1.1和vs.net2003的新功能。
I believe that is new feature of .Net 1.1 and vs.net2003 only.




这就是针对这个问题(谢谢)现在......我正在网上看看,但是你知道我怎么能清理我机器上的.Net混乱

: - )


我似乎有版本1.0.3705,报告的大小为1,721MB

我看起来没有版本1.1,据报道大小为37MB < br $>

奇怪的是VS Studio报告它的大小也是1,721MB(看起来像是b / b
不仅仅是巧合)

>
有没有一种干净的方法可以消除不需要的东西,并且有一个工作的VB

带有.Net 1.1的Studio你知道吗?


谢谢,

Tom



That pinpointed the problem (thanks) now... I''m looking around the net but
would you have an idea how I can clean up the .Net mess I have on my machine
:-)

I appear to have Version 1.0.3705 with a reported size of 1,721MB
I appear ot have Version 1.1 with a reported size of 37MB

and strangely VS Studio is reporting it''s size as 1,721MB also (seems like
something more than a coincidence)

Is there a clean way to eliminate the unneeded stuff and have a working VB
Studio with .Net 1.1 that you are aware of?

Thanks,
Tom


这篇关于我的每一个......因为...事情被打破了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆