I own Visual Studio 2015 Enterprise and I'm unsure about making VS' Smart Indent feature use my coding style, so far I've configured most of it, except for ternary operators. Example:
bool bSomeBoolean = true;
// my code
for(int i = 1; i <= 39; i++)
{
Console.WriteLine(bSomeBoolean? "Yes":"No");
}
// smart indent
for(int i = 1; i <= 39; i++)
{
Console.WriteLine(bSomeBoolean ? "Yes" : "No");
}
VS will add the space before the question mark, also before and after the colon.
How could I stop it from happening? Couldn't find anything in the settings.
Thanks!
for(int i=1;i<=39;i++)- Exactly as @Shweta Goyal said, readability is key. Especially on multi-person projects