I commented on this answer some time ago regarding how visual studio comments out code with //
or /* */
. I was thinking to revise the answer (to include my findings) but I had to test it first, which kind of confused me.
My finding is that depending on what you comment when you press Ctrl - K, Ctrl - C you will get either //
or /* */
.
First example:
<start selection here> code();
someCall();
thirdCall();<end selection here>
this will produce the following:
//code();
//someCall();
//thirdCall();
Second example:
<start selection here>code();
someCall();
thirdCall();<end selection here>
this will produce the following:
/*code();
someCall();
thirdCall();*/
Third example
<start selection here>code();
//someCall();
thirdCall();<end selection here>
this will produce the following:
//code();
////someCall();
//thirdCall();
Note that example 2 and 3 is the exact same selection, but the comment makes Visual Studio interpret it differently.
Why is this?