Find matching End If for If?

MikeOtown

New member
Joined
Jun 2, 2007
Messages
1
Programming Experience
5-10
Is there a way to easily find the matching End If statement for an If statement?
 
usually i'll place the mouse cursor on the 'I' of the the If statement then i'll press the PageDown key on the keyboard until i reach the End If where the 'E' is lined up with the mouse cursor
 
1) Install the free SlickEdit tools, one of which draws a vertical dashed line throught he i-bar and all lines.. you can see which lines are on the same indent level

2) Use C#, the start { or end } of a block is automatically highlighted when the related end } or start } is being "touched" by the I-bar cursor
 
This is one of the things I like about the verbose VB syntax - "End If" is more helpful than "}".

But MikeOtown is right, this is a very helpful editing feature that is present in many text editors nowadays but it is still missing from VS (although it seems to be there for C#, according to cjard).
 
This is one of the things I like about the verbose VB syntax - "End If" is more helpful than "}".
If you keep to the programming mantra that you shouldnt have blocks of code longer than one screen, it becomes less of an issue.. Though addmittedly you will very occasionally see my C# code look like:

VB.NET:
      } //while x>10
    } //if enabled
  } //for i 
}//method()

;)
 
Back
Top