Search code examples
xamarinxamarin-studio

How to change the way Xamarin Studio formats code?


I'm the kind of guy how writes my code like this

if(...)
{

}

but every time I do that Xamarin Studio automatically changes my code to this

if(...){

}

How do I change this?


Solution

  • In Xamarin Studio's preferences, go to Source Code > Code Formatting > C# source code, and click the Edit button:

    C# formatting preferences

    From there you can customize basically everything. You can select the Braces category to customize brace formatting:

    Brace preferences