Block commenting VB/VB.NET code

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

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

12条回答
  •  死守一世寂寞
    2020-12-06 04:21

    Block comments in C-like style /* my comment */ would be useful on e.g. multi-line VB.net statements. They are currently not available. However, in place of writing

    myVal = "bla bla bla" /* my comment */ _
          + " more of the same " _
          + " and still more "
    

    You could write:

    myVal = "bla bla bla" + 'my comment
            " more of the same " +
            " and still more "
    

    That will work on the later versions of VB.Net.

提交回复
热议问题