Special "else if" treatment - Why ??? Permanently deleted user Created August 08, 2007 10:35 In ReSharper there is an option "Special "else if" treatment for C#"Can someone give me a qualified reason, why to prevent "else if" statements ?
There are people who perceives 'else if' construct as a single one, not as a
one-statement else branch of an enclosing if construct.
See for example Visual Basic's construct If - ElseIf - EndIf
--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hello,
I guess you're speaking about the code formatter options, which don't have
anything to do to the parsing logic.
With special treatment, it's formatted into
if(…)
…
else if(…)
…
And without it things would look like this:
if(…)
…
else
{
if(…)
…
}
I believe there's also a preview in the options.
The first view is more “switch-case”ish in its look, which corresponds to
the nature of this construct.
—
Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”