[2108]Another intellisense problem
I'm working on a VB solution with Visual Studio 2008. When i code an assignment i have the following entries in the intellisense popup:
The problem is, that i never define variables with preceeding underscores as this violates our coding standards. So why R# shows these variables?
Regards
KIaus
Please sign in to leave a comment.
Hello Klaus,
Could you please clarify the problem? Do I understand correctly that you
defined those variables without underscores, while ReSharper shows them with
underscores in code completion list? Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
The fact is, that the variables with the underscore are not defined in the solution. If i execute a "Find in Files" for example for "_optStart" over the complete solution i can't find any occurence. Astonishing when i use such a variable there is no error neither from R# analysis nor from VB compiler. When i try to "Goto Declaration" R# throws an exception (see RSRP-230397). So it seems that R# shows variables for internally used / generated / hidden code (maybe from the forms designer ???).
Regards
Klaus
Hello Klaus,
In order to find out where those variables come from, copy your solution
to some folder and then remove projects/references and classes until those
variables disappear from the completion list. Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hello Klaus,
Did you declare some of the properties using WithEvent? Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
i could reproduce the problem with a new blank solution. Added a VB Windows Forms project, then a Combobox on the form. When i start typing ComboBox1 in the editor, intellisense shows _ComboBox1 (after scrolling up a little bit). As User-Controls always declared "WithEvents" in the Forms Designer generated code i have to answer your question with Yes ;).
Regards
Klaus
Hello Klaus,
The _ symbols are generated by the VB.NET compiler for fields declared
using WithEvents. We will fix the navigation exception and we will also remove
those generated items from code completion. Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Thanks for the feedback, i'm awaiting the next EAP Builds :)