Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change default position of "{" in VS2010?

I started using VS2010 and C# and the " { "s are weird. If I create a new project or autocreate a function its always like:

function()
{
    //
}

So I have to edit it several times. How to change that to normal? Normal is for me:

function() {
    //
}

I know thats not that important, but I dont like it. Im sure there is a way to change that, is there? Thank you

Edit: Thank you all for the fast answers. Maybe another thing that I would like to know - if I change the rules for the { and creating a big project. And if other people want to work on it too (on their own VS2010), can they change somehow the { back to normal without any problems or just manually? Edit2: Nope, I think its not possible.

like image 821
sabisabi Avatar asked Dec 02 '22 00:12

sabisabi


1 Answers

This is an option in visual studio:

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

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

like image 137
Bas Avatar answered Dec 05 '22 07:12

Bas