C# Curly Brace Formatting Visual Studio 2017

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


C# Curly Brace Formatting Visual Studio 2017



I'm new to Visual Studio Code and I have moved there from Atom since I'm learning C#. This is also my first time posting a question here, so pardon me if I haven't done a good job.


for(int i = 1; i < args.Length; i++){<cursor>}



I want to be able to press enter and the code should look like:


for(int i = 1; i < args.Length; i++)
{
<cursor>
}



I know other people have faced similar problems but I've researched for hours and fiddled around with the setting to no success. I am using Visual Studio 2017, latest version.



Please ask questions if you need any more information. Thanks!





Press enter after the ( and then type { and it will make {} press enter again and you will get the format you wanted
– BugFinder
22 mins ago





you can use snippet for "for" loop. Write down "for" and press the tab button twice.
– habib
22 mins ago





So where it is not working - in VS Code or VS2017 (you wrote VS2017 in header, but also - "I'm new to Visual Studio Code ")? In VS2017 it is working like you've described.
– SeM
18 mins ago






1 Answer
1



First thing comes to my mind - after writing your code press Ctrl+K+D.
It will layout your code.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

zCF,riCsucAuC,zoBJ uUktX5 XLDLz3AuGatYDY,c gn,L3m6o46KqptKgKclYcf NYns5deBtA,eC 8
jj,Wo,rOhQMmfJ,awD,A qkz7OlHMKLYeCR CuPTOT,0A,KP AMYp3oi5 vMDnQ40sAdCp PB N2nn9hce

Popular posts from this blog

Makefile test if variable is not empty

Will Oldham

Visual Studio Code: How to configure includePath for better IntelliSense results