D
Daniel Billingsley
Speaking of trying to read deeply nested if-else blocks...
I often find it's not always easy to tell one indent level from another
(granted I keep my tab settings low so I'm not halfway across the page by
the 3rd level), and I find myself doing things like this to help me keep it
straight:
class MyClass
{
public void SomeMethod()
{
blah blah blah
switch (something)
{
case blah blah blah
} // end: switch (something)
} // end: SomeMethod()
} // end: class MyClass
Mainly so that when I'm working on the code and need to insert functionality
after the switch, for example, it is instantly obvious exactly where that
code goes. As someone pointed out, the "end" keywords of VB do make that a
little more readable, but as those statements don't say "what" is being
ended only so much so.
Does anyone else do this sort of thing, or am I the only one that likes
small tab indents, or just the only idiot that can't read my own code?
If I'm not, then wouldn't this be a nice code assist feature like when you
type "///" in front of a method?
(I know it's not an earth-moving topic, but sometimes something light to
discuss brightens the day a bit, doesn't it?)
I often find it's not always easy to tell one indent level from another
(granted I keep my tab settings low so I'm not halfway across the page by
the 3rd level), and I find myself doing things like this to help me keep it
straight:
class MyClass
{
public void SomeMethod()
{
blah blah blah
switch (something)
{
case blah blah blah
} // end: switch (something)
} // end: SomeMethod()
} // end: class MyClass
Mainly so that when I'm working on the code and need to insert functionality
after the switch, for example, it is instantly obvious exactly where that
code goes. As someone pointed out, the "end" keywords of VB do make that a
little more readable, but as those statements don't say "what" is being
ended only so much so.
Does anyone else do this sort of thing, or am I the only one that likes
small tab indents, or just the only idiot that can't read my own code?
If I'm not, then wouldn't this be a nice code assist feature like when you
type "///" in front of a method?
(I know it's not an earth-moving topic, but sometimes something light to
discuss brightens the day a bit, doesn't it?)