Using Visual Studio 2019 Community (v16.6.1). When editing C/C++/C# code, select several lines of code:
int countLines = 0;
if (!editingDocument)
countLines = GetDocumentLines();
Now trigger Edit.ToggleBlockComment (Ctrl+Shift+/), or Edit.ToggleLineComment (Ctrl+K, Ctrl+/). In both cases, "C style" comments are applied:
/*int countLines = 0;
if (!editingDocument)
countLines = GetDocumentLines();*/
This is ok, but I actually wanted C++ style, single-line comments:
// int countLines = 0;
// if (!editingDocument)
// countLines = GetDocumentLines();
Is this possible? Ideal would be Edit.ToggleBlockComment to use "C style" and Edit.ToggleLineComment to use "C++ style".
Update
Thanks to one of the comments, I can confirm that when there is at least one comment inside the selected block, VS is smart enough to use C++ single-line comments for the whole block. While this doesn't answer the question, it is a useful workaround for now.