Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing VS2010 text formatting

I am looking for a c# formatting which will do(like in Eclipse):

f(){
}

instead of

f()
{
}

I have checked tools->options formatting but could not find it.

like image 922
Robert Avatar asked Aug 12 '26 23:08

Robert


1 Answers

Tools -> Options 
    -> Text Editor 
        -> C# 
            -> Formatting 
                -> New Lines 
                    -> New line options for braces 
                        -> Place open brace on new line for ....

There are a few options in there, I'm guessing you're likely wanting to disable most of those. But specifically in this case I believe is for Place open brace on new line for control blocks.

In addition, check out the other options for C# in and around there. It's pretty extensive and most likely you'll be able to achieve whatever combination of style you desire.

like image 148
Chris Sinclair Avatar answered Aug 14 '26 12:08

Chris Sinclair