I recently upgraded to Visual Studio 2015 (Update 1) and got the settings the way I want them to be, however I have a little formatting problems regarding curly braces! I assume that the second code sample is a more acceptable convention, but I cannot get the correct settings. What am I doing wrong here?
Visual Studio is currently automatically formatting my code like this, pay attention to else {
public static string Gender(string x)
{
if (x == "M")
{
return "Male";
}
else if (x == "F")
{
return "Female";
}
else {
return "Unknown";
}
}
I would like my code to be automatically formatted as
public static string Gender(string x)
{
if (x == "M")
{
return "Male";
}
else if (x == "F")
{
return "Female";
}
else
{
return "Unknown";
}
}
source
share