Automatically Add Parentheses and a Semicolon to a Selected Intellisense Method.
I wonder how many times developers had to type Parentheses and Semicolon after selecting a simple Method from Intellisense: for example, foo.ToString();
Having to type parentheses and semicolons all the time, especially for Methods that accept no parameters, is a huge waste of time.
Right now a Tab key selects the method with no Parentheses or Semicolon, so I would suggest Tab Tab or other key combination that could give the developer the freedom to complete the sentence period.
Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we havenÕt acted on it. Looking at the VS Ò15Ó plans, weÕre not going to take action on this item, so weÕre going to close it. If the suggestion is still relevant, please either take a look to see if thereÕs another suggestion thatÕs similar that you can vote on, or open a new suggestion.
- The Visual Studio Team
Leonardo Lombardi commented
They decided not to implement it. At least they answered it...
I vote up for this feature and I think trailing semicolon can be handled intellectually: if user just pressed [Enter] to insert some method, "();" will be inserted also, but if user then press +-./* then semicolon should be deleted and space+sign inserted. Quite easy!
how about just advancing cursor BEHIND closing parentheses?
the yucky part is either typing ); or moving further.
Extensions doing this uses Shift+Enter to add the semicolon and go to the next line.
What if you want to use the method as an argument?