Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent Visual Studio from adding extra asterisks when hitting enter inside a multiline comment

If you are coding C# inside visual studio, and you have a multiline comment, thusly:

/*
This is a very interesting comment
that consists of multiple lines
*/

Then if you are inside the comment, like after the word "comment" in my example, and you hit enter, Visual Studio adds a "* " on the new line and places your cursor even with the "*" that started the comment.

I hate this behavior. It is never what I want. Any way to turn it off? I wandered through the editor options but I couldn't find it.

like image 237
RationalGeek Avatar asked Aug 16 '10 13:08

RationalGeek


1 Answers

Strangely enough this behavior is tied to XML doc comment generation in the C# editor. If you disable XML doc comment generation it will also disable the auto-generation of the * in multi-line comments

  • Tools -> Options
  • Text Editor -> C# -> Advanced
  • Uncheck "Generate XML doc comments ..."
like image 80
JaredPar Avatar answered Sep 30 '22 17:09

JaredPar