Nick
Nick

Reputation: 10499

Visual Studio - Code Formatting (curly braces)

I am in trouble with the Visual Studio 2013 code formatting. In particoular I have the following problem: when I cut and paste some C++/C# code it is re-formatted as follow:

int main() {
  ...
}

While I would prefer the following indentation (please note the position of the opening curly brace):

int main()
{
  ...
}

Where can I find the proper indentation setting?

Upvotes: 5

Views: 3635

Answers (1)

Zereges
Zereges

Reputation: 5209

Tools -> Options -> Text Editor -> C/C++ -> Formatting -> New Lines and choose what suits you. Then, do the same thing for C# settings.

Upvotes: 3

Related Questions