Line continuation characters? To use or not to use... that is the question
In my book for the Visual Basic class I'm in right now it tells me that I need to use a line continuation character (_) in the middle of each line... to keep my lines of code shorter.
So, for instance(and this won't work TOO well... since this will line wrap... but...)
Private Sub txtCartons_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCartons.TextChanged
Becomes:
Private Sub txtCartons_TextChanged(ByVal sender As _
System.Object, ByVal e As System.EventArgs) _
Handles txtCartons.TextChanged
If you were looking at this in Visual Studio .NET 2003 the first line would run right along in its merry way.. off the right hand side of the screen.
The book argues that you should put the under-score(s) in there to increase readability... I can understand that with some really long handwritten code, but when it comes to some dinky lil event handler code, I don't even need to review/edit it anyways...
My main argument against doing this: I'm too lazy.
Going back through all my code and adding the underscore(s) in the right places is kind of a pain.
Well, gotta run... we're powering down the network, lightning storm here. I'll be back later.

2 Comments:
"Too lazy?!"
*scribbles furiously on clipboard*
Heh
That's Gay!
Post a Comment
<< Home