Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I stop Visual Studio from automatically inserting asterisk during a block comment?

I'm tearing my hair out with this one. If I start a block comment /* in VS.NET 2005+ then carriage return, Visual Studio insists that I have another asterisk *. I know there's an option to turn this off but I just can't find it. Anyone know how to turn this feature off?

like image 403
tgeros Avatar asked Sep 09 '08 03:09

tgeros


People also ask

How do you comment out a block in VSCode?

If you select a block of code and use the key sequence Ctrl+K+C, you'll comment out the section of code.


3 Answers

Update: this setting was changed in VS 2015 update 2. See this answer.

This post addresses your question. The gist of it is:

Text Editor > C# > Advanced > Generate XML documentation comments for ///
like image 129
Michael Haren Avatar answered Oct 06 '22 10:10

Michael Haren


Visual Studio 2015 Update 2 has (finally) addressed this problem!

A new option as been added to Tools > Options > Text Editor > C# > Advanced named Insert * at the start of new lines when writing /* */ comments.

Disabling this option prevents the editor from automatically prefixing block comments with asterisks. It only took 7.5 years and 4 major releases :)

enter image description here

like image 26
Nick Avatar answered Oct 06 '22 11:10

Nick


Try this:

#if false

    whatever you want here
    and here

#endif
like image 39
wozza Avatar answered Oct 06 '22 12:10

wozza