You're probably already aware of the two popular types of ways to comment-out text in your code:
1. Single line comment with the double right-slash:
2. Commenting out an entire segment with the opening
/*
and the closing
*/
:
and you've probably commented out an entire segment with no regard for the single line comments tucked within:
but have you ever considered commenting out the opening/closing comments? "why would I do that?" you may ask.
int intValueA = 12;
int intValueB = 234;
int intSum = intValueA + intValueB;
Of course when you comment out the opening-comment slash-asterisk, then that segment of code is no-longer commented out and by commenting out the closing asterisk-slash combination, it is ignored whenever the segment is not commented it
and it still terminates the segment if the opening is not commented.
In other words, by doing this, you can easily comment/uncomment the entire segment by uncommenting/commenting the opening comment.