Block commenting VB/VB.NET code

前端 未结 12 1120
死守一世寂寞
死守一世寂寞 2020-12-06 03:57

How to comment multiple lines of code/block of code in VB?

12条回答
  •  一向
    一向 (楼主)
    2020-12-06 04:41

    Totally abusing compiler directives here... but:

    #If False Then
    Comments
    go
    here
    #End If
    

    You don't get the benefits of proper code coloration (it doesn't show in green when using the default color scheme) and the implicit line-continuation system automatically indents lines in a paragraph starting at the second line. But the compiler will ignore the text.

提交回复
热议问题