I need a few people to test the below testcase in VS 2010 and VS 2010 Express and please let me know if I am experiencing a possible (and highly annoying) IDE/Code Editor bug.
Create a new VB Project and make it a Windows Form application and add a new module to the project. In the module, paste the below code:
Public Sub Bug()
Dim Ninja As Object = Nothing
Dim Pirate As Object = Nothing
If (Not Ninja Is Nothing) AndAlso (Not Pirate Is Nothing) Then _
Call String.Join(","c, {"one",
"two", "three"})
End Sub
Now, position the cursor before the opening double quote in the word "two"
. Press the tab key one time, and then press either the up arrow or down arrow.
If the bug fires, that entire line of text will be deleted. It will not fire if the If
block is omitted, or the If
block uses a closing End If
(instead of just the line continuation character).
I am experiencing this on VS2010 Express (VB.NET version). I'll have to try it in VS2010 Premium at work to verify there. I suspect that, if it is a genuine bug, it's in Intellisense, cause the up/down keys usually trigger that to pop up with suggestions. Maybe it gets confused and just deletes the line somehow?
I thought my project file was 开发者_高级运维corrupted, but I tested this in a brand new project and it still triggers.
If it is a bug, where do we report these things?
I can confirm the bug in VS2010 Ultimate Edition. The line gets deleted. Also when I use backspace instead of tab.
You can report the bug on http://connect.microsoft.com under visual studio
Marcel
精彩评论