Change default position to "{" in VS2010?

I started using VS2010 and C #, and " { ) is weird. If I create a new project or automatically create a function, it will always look like this:

function() { // } 

Therefore, I have to edit it several times. How to change this? Normal for me:

 function() { // } 

I know that this is not so important, but I do not like it. I am sure there is a way to change this, right? Thanks you

Edit: Thanks everyone for the quick answers. Maybe one more thing I would like to know is if I change the rules for { and create a large project. And if other people want to work on it (on their own VS2010), can they somehow change { as usual, without any problems or just manually? Edit2: No, I think this is not possible.

+4
source share
3 answers

This is an option in visual studio:

Tools => Options => Text Editor => C # => Formatting => New Lines => New line options for curly braces.

You can choose this for type / method, etc. separately.

+13
source

Go to Tools->Options...->Text Editor->C#->Formatting->New Lines . You can change the settings there.

+4
source

I would recommend that you look at the C # Coding Rules before continuing too much. Putting braces on a new line will seem strange to someone coming from the Java background, but this is standard practice in the C # community, and experienced engineers who will check / debug / update your code in the future will appreciate that you support this practice.

+2
source

Source: https://habr.com/ru/post/1403659/


All Articles