简体   繁体   中英

Is it possible to auto complete with function braces? c# visual studio

When I type some letter of a function name in visual studio, it suggests me to auto complete the name of the method by pressing Tab . See picture

After I press Tab it auto completes the name of the method without braces, I'm sure you all know how it works. My question is, is there a way to auto complete the name of the method with braces? instead of auto completing method_name , make it be method_name()

It will help me a lot because most of the time I just need to execute the method.

I think you cannot get what you want so far.

And VS does not such Intellisense function by default.

As a suggestion ,

1) just as NDJ said, Resharper vs extension has the option that automatically add brackets to methods when auto-completing.

And Resharper is free for 30 days if you are a new user.

2) Or before you click Enter to complete automatic filling from the Intellisense suggestion window, press the key combination Shift + ( and it will automatically add () with the method.

在此处输入图片说明

===============================================

Besides , if the two suggestions do not meet your requirements, you shouldsuggest your idea to the Team .

在此处输入图片说明

And when you finishing the ticket, you can share the link here and anyone who is interested in it including us will vote it.

With all of these, I think it will get more attention from Microsoft to help us deal with it more quickly.

To sum up, @Perry Qian-MSFT said that now its not quite possible to do it, and suggested me to post this idea to the team.

Here is a link to it, Make sure you all upvote it if you want this idea to get attention from Microsoft, I will really appreciate it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM