This appears to only be a problem for VB, in C# it behaves correctly.
Consider the following code:[VB.NET]
Public Function Test() As String Dim astring = "123" Dim cstring = "blah" Return astring End Function
On the return line, select astring then press the c key on your keyboard (eg, to change it to return cstring). Instead of the selection being replaced with the letter 'c', the try catch embedding is triggered:[VB.NET]
Public Function Test() As String Dim astring = "123" Dim cstring = "blah" Try Return astring Catch ex As Exception End Try End Function
In C# this is only triggered if the entire line is selected, so it looks like the scope is broken. The same sort of thing happens with 'n', 'f', etc. This is really irritating, so I'd welcome a quick fix for it. Not sure why, but I've only noticed it in the last day or so, despite not updating coderush or visual studio recently. Only extension that has changed was an update to the MS reporting services project extension.
Show all comments