VS编辑器激怒
大家好,
不确定这是否仅限于VB.NET,或者它是否也会影响C#编辑器,
但是这里有。
在一个新的解决方案中,在一个空白的代码文件中,在一个
命名空间内创建一个空类。然后,在End Namespace之后的代码底部,为Enum添加代码
,如下所示:
''====== ==========
命名空间测试1
公共类Class1
结束类
结束命名空间
Public Enum ABC
foo
bar
snay
结束枚举
''================
折叠Enum的代码区域(或者只需按Ctrl + M,Ctrl + O)。
在课堂的某个地方,按回车键。插入了一个回车,但是光标没有移动到一个新行!
!我已经搜索了选项
对话框,但奇怪的是找不到任何说不要换新行
插入一个马车后当有一个命名空间,类,
枚举......等等时返回,所以我可以假设它是编辑器中的一个错误?请
有人纠正我,如果我错了!
干杯,
Alex Clark
Hi All,
Not sure if this is limited to VB.NET or if it affects the C# editor too,
but here goes.
In a new solution, inside a blank code file create an empty class inside a
Namespace. Then, at the bottom of the code after End Namespace, add code
for an Enum, as shown below:
'' ================
Namespace Test1
Public Class Class1
End Class
End Namespace
Public Enum ABC
foo
bar
snay
End Enum
'' ================
Collapse the code region for the Enum (or just do the Ctrl+M, Ctrl+O).
Somewhere inside the class, press return. A carriage return is inserted but
the cursor doesn''t move to a new line! I''ve searched through the options
dialog but strangely can''t find anything that says "Don''t go to a new line
after inserting a carriage return when there''s a Namespace, Class,
Enum....etc", so all I can assume is that it''s a bug in the editor? Please
someone correct me if I''m wrong!
Cheers,
Alex Clark
虽然与这个问题没有完全相关,但为什么你的名字会在命名空间中超出
?我能想到的唯一原因是你在项目的默认命名空间中放置一个
命名空间。如果是这样,你仍然可以将bum枚举成一个不同的文件,这将有助于代码维护。
你的问题很可能是一个bug,但是总的来说,很多人不太可能会遇到它,因为它非常具体。如果你问我,崩溃地区总体来说有点儿错误
,但它只需单击一下鼠标即可轻松到达页面的另一部分。如果再打一个马车
返回,你可能会看到新的一行。我不确定为什么需要两个实际出现的
,但这是IDE的本质......至少现在是这样。
- -
Gregory A. Beamer
MVP; MCP:+ I,SE,SD,DBA
**************************** ********************** ********************
在盒子外面思考!
************************************* ************* ********************
" Alex Clark" <人** @ theclarkhome.spamtin.net>在留言中写道
新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ...
While not exactly related to the question, why do you have your enum sitting
outsid of the namespace? The only reason I can think of is you are putting a
namespace within the default namespace for the project. If so, you can still
break the enum out into a different file, which would help code maintenance.
Your issue may well be a bug, but it is, overall, unlikely many people will
encounter it, as it is very specific.The collapse region is a bit buggy
overall, if you ask me, but it is rather easy to get around with a single
mouse click to another section of the page. If you hit one more carriage
return, you will likely see the new line. I am not sure why it takes two to
actually show up, but it is the nature of the IDE ... at least for now.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Alex Clark" <al**@theclarkhome.spamtin.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
大家好,
不确定这是否仅限于VB.NET,或者它是否也会影响C#编辑器,
但是这里也是如此。
在一个新的解决方案中,里面空白代码文件在
命名空间内创建一个空类。然后,在End Namespace之后的代码底部,为Enum添加代码
,如下所示:
''============== ==
命名空间测试1
公共类Class1
结束类
结束命名空间
Public Enum ABC
foo
bar
snay
End Enum
''================
>折叠Enum的代码区域(或者只需按Ctrl + M,Ctrl + O)。
在课堂的某个地方,按回车键。回车符插入
,但光标不会移动到新行!我已经搜索了选项
对话框,但奇怪的是,当有一个命名空间插入回车后,找不到任何说不要去新行的东西, Class,
Enum .... etc,所以我可以假设它是编辑器中的错误?
如果我错了,请有人纠正我!
干杯,
Alex Clark
Hi All,
Not sure if this is limited to VB.NET or if it affects the C# editor too,
but here goes.
In a new solution, inside a blank code file create an empty class inside a
Namespace. Then, at the bottom of the code after End Namespace, add code
for an Enum, as shown below:
'' ================
Namespace Test1
Public Class Class1
End Class
End Namespace
Public Enum ABC
foo
bar
snay
End Enum
'' ================
Collapse the code region for the Enum (or just do the Ctrl+M, Ctrl+O).
Somewhere inside the class, press return. A carriage return is inserted but the cursor doesn''t move to a new line! I''ve searched through the options
dialog but strangely can''t find anything that says "Don''t go to a new line
after inserting a carriage return when there''s a Namespace, Class,
Enum....etc", so all I can assume is that it''s a bug in the editor? Please someone correct me if I''m wrong!
Cheers,
Alex Clark
>
嗨格雷戈里,
我刚刚遇到它但没有时间报告它。我想我会把Enum放在命名空间下面因为我不能理解的原因,所以它不属于那个命名空间,而是因为它只是一个小的
我没有看到需要一个全新的代码文件。我通常使用Class
资源管理器在我的解决方案中找到类似的东西,所以我没有
太多担心将代码放在这样的地方。
虽然我同意这是一个古怪的一个,但我几乎要张贴询问这个
是否真的是一个副设计功能,或者它是否' '已知/接受的错误。让我们面对
吧,我们要等到2004年中期(最早)换一个新的
版本,所以MS不妨得到我们
可以找到所有的琐事。
干杯,
Alex Clark
Cowboy(Gregory A. Beamer)" <否************ @ comcast.netNoSpamM>写在
消息新闻:el ************** @ TK2MSFTNGP10.phx.gbl ...
Hi Gregory,
I came across it a while ago but hadn''t had time to report it. I think I''d
put the Enum down below the Namespace because for reasons which I cannot
remember, it didn''t belong in that Namespace, but as it was only a small one
I didn''t see the need for a whole new code file. I generally use the Class
Explorer to find things like that in my solutions anyway, so it I don''t have
too many concerns putting code in places like that.
Although I agree it''s a quirky one, I was pretty much posting to ask if this
really was a by-design feature or if it''s a known/accepted bug. Let''s face
it, we''ve gotta wait till halfway through 2004 (at the earliest) for a new
version anyway, so MS might as well get all the niggles sorted out that we
can find.
Cheers,
Alex Clark
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamM> wrote in
message news:el**************@TK2MSFTNGP10.phx.gbl...
虽然不完全相关问题是,为什么你的enum
坐在命名空间之外?我能想到的唯一原因是你将
命名空间放在项目的默认命名空间中。如果是这样,你可以
仍然将枚举打破到另一个文件,这将有助于代码
维护。
你的问题可能是一个错误,但总的来说,不太可能是很多人
会遇到它,因为它非常具体。如果你问我,崩溃区域总体来说有点儿错误,但只需单击鼠标即可轻松绕过它页面的另一部分。如果再打一次马车返回,你可能会看到新的一行。我不确定为什么实际出现需要两个
,但这是IDE的本质......至少目前是这样。
-
Gregory A. Beamer
MVP; MCP:+ I,SE,SD,DBA
******************************** ****************** ********************
在盒子外面思考!> ************************************************* * ********************
Alex Clark <人** @ theclarkhome.spamtin.net>在消息中写道
新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ...
While not exactly related to the question, why do you have your enum sitting outsid of the namespace? The only reason I can think of is you are putting a namespace within the default namespace for the project. If so, you can still break the enum out into a different file, which would help code maintenance.
Your issue may well be a bug, but it is, overall, unlikely many people will encounter it, as it is very specific.The collapse region is a bit buggy
overall, if you ask me, but it is rather easy to get around with a single
mouse click to another section of the page. If you hit one more carriage
return, you will likely see the new line. I am not sure why it takes two to actually show up, but it is the nature of the IDE ... at least for now.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Alex Clark" <al**@theclarkhome.spamtin.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
大家好,>
不确定这是否仅限于VB.NET,或者它是否会影响C#编辑器
,但这里也是如此。
在一个新的解决方案中,在一个空白的代码文件中在
a Namespace中创建一个空类。然后,在End Namespace之后的代码底部,为Enum添加
代码,如下所示:
''============== ==
命名空间测试1
公共类Class1
结束类
结束命名空间
Public Enum ABC
foo
bar
snay
End Enum
''================
>折叠Enum的代码区域(或者只需按Ctrl + M,Ctrl + O)。
在课堂的某个地方,按回车键。插入回车符
Hi All,
Not sure if this is limited to VB.NET or if it affects the C# editor too, but here goes.
In a new solution, inside a blank code file create an empty class inside a Namespace. Then, at the bottom of the code after End Namespace, add code for an Enum, as shown below:
'' ================
Namespace Test1
Public Class Class1
End Class
End Namespace
Public Enum ABC
foo
bar
snay
End Enum
'' ================
Collapse the code region for the Enum (or just do the Ctrl+M, Ctrl+O).
Somewhere inside the class, press return. A carriage return is inserted
但
光标没有移动到新行!我已经搜索了
选项对话框,但奇怪的是找不到任何说在有名称空间时插入回车后不要去新的
行, Class,
Enum .... etc,所以我只能假设它是编辑器中的错误?
the cursor doesn''t move to a new line! I''ve searched through the options dialog but strangely can''t find anything that says "Don''t go to a new line after inserting a carriage return when there''s a Namespace, Class,
Enum....etc", so all I can assume is that it''s a bug in the editor?
请
有人纠正我如果我错了!
干杯,
Alex Clark
someone correct me if I''m wrong!
Cheers,
Alex Clark
>
*" Cowboy \(Gregory A. Beamer \)" <否************ @ comcast.netNoSpamM> scripsit:
* "Cowboy \(Gregory A. Beamer\)" <No************@comcast.netNoSpamM> scripsit:
你的问题可能是一个错误,但总的来说,不太可能有很多人会遇到它,因为它非常具体。
Your issue may well be a bug, but it is, overall, unlikely many people will
encounter it, as it is very specific.
我无法在VS.NET 200 * 2 *机器上重现问题。
-
Herfried K 。瓦格纳[MVP]
< http://www.mvps.org/dotnet>
I am not able to repro the problem on a VS.NET 200*2* machine.
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>