AAHHH #if/else/endif placement in Visual Studio
-
This is driving me up the wall and I can't find a solution. The C# code editor property places #region directives, but #if/else/endif directives always jump to the beginning of the line instead of the current indentation level. What gives? Any way to change the default??
-
This is driving me up the wall and I can't find a solution. The C# code editor property places #region directives, but #if/else/endif directives always jump to the beginning of the line instead of the current indentation level. What gives? Any way to change the default??
-
Mike Marynowski wrote:
#if/else/endif directives always jump to the beginning of the line instead of the current indentation level.
I always think that is the best way, so you can clearly see where some code may be parsed out by the preprocessor.
I disagree. It just looks stupid when you have code indented 5 or 6 tabs (i.e. deep in a nested loop) and the compiler directives are at the beginning of the line. It becomes difficult to see what lines are even affected at that point. Seeing what code is parsed out is easy because visual studio grays out and collapses the region. Either way it just looks messy...I much rather have them indented like the region tags.
-
I disagree. It just looks stupid when you have code indented 5 or 6 tabs (i.e. deep in a nested loop) and the compiler directives are at the beginning of the line. It becomes difficult to see what lines are even affected at that point. Seeing what code is parsed out is easy because visual studio grays out and collapses the region. Either way it just looks messy...I much rather have them indented like the region tags.
-
Mike Marynowski wrote:
I disagree. It just looks stupid
Yes, but these things are just based on personal preference; as with most things there is no right and wrong.
Of course...I'm not suggesting your wrong...just disagreeing that it is better and citing my reasons.
-
Of course...I'm not suggesting your wrong...just disagreeing that it is better and citing my reasons.