How to: Comment Out Lines of CodeĀ 

The Visual J# Code Editor provides the ability to quickly comment out a block of code in order to deactivate it. You can also remove the comments to activate your code just as easily.

To comment out lines of code

  1. Highlight the block of code you want to convert into comments in the Code Editor.

  2. On the Edit menu, point to Advanced, and then click Comment Selection.

    -or-

    Press CTR + K, CTR + C.

    -or-

    Click the Comment out the selected lines. button on the Text Editor toolbar.

    The Code Editor precedes each line in the highlighted block with //, thereby converting it into a comment.

See Also

Other Resources

Using Visual J# Express
Visual J# Express Tips and Tricks