dbnewbie
asked on
Optimize Code By Commenting Out Blank Lines?
Someone told me that commenting out blank lines in VB.NET code improves efficiency because the compiler does not have to evaluate the blank lines. For example:
MessageBox.Show("Hello world!")
'
'
'
MessageBox.Show("I commented out the blank lines.")
This sounds ridiculous to me. Blank lines in code should be ignored by the compiler -- whether or not it is commented out. Am I right?
Is there (or was there ever) a language where commenting out blank lines made a difference?
MessageBox.Show("Hello world!")
'
'
'
MessageBox.Show("I commented out the blank lines.")
This sounds ridiculous to me. Blank lines in code should be ignored by the compiler -- whether or not it is commented out. Am I right?
Is there (or was there ever) a language where commenting out blank lines made a difference?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I used ILDASM and noticed no difference. Thanks.
It may do with compilers from other languages, but it certainly isnt the case with .net.
regards,
KS