serge
serge

Reputation: 15239

Can I auto-format the opening bracket on the same line with Visual Studio?

Is there possible to auto-format in Visual Studio like this

public int Id {
    get => id; 
}

rather than

public int Id 
{
    get => id; 
}

Upvotes: 0

Views: 29

Answers (1)

Per
Per

Reputation: 26

Yup,

Go to Tools -> Options

and find

TextEditor -> Your language -> Code Style -> Formatting -> New Lines

Unselect the options for when you do not want new lines.

All languages don't have this option but I guess you are looking for C#.

Upvotes: 1

Related Questions