简体   繁体   English

为 C# 格式化 C 样式注释的设置

[英]Setting for formatting C-style comments for C#

Writing C# in Visual Studio 2019. With the following construct:在 Visual Studio 2019 中编写 C#。使用以下构造:

/* My comment
*/

Set the cursor to the right of comment and press Enter .将 cursor 设置在comment右侧,然后按Enter This gets converted to:这将转换为:

/* My comment
 *
*/

I'd prefer:我更喜欢:

/* My comment

*/

After hunting around in Tools > Options , could not find the setting for this...where is it?Tools > Options中四处寻找后,找不到此设置...它在哪里?

Open Visual Studio options and navigate to:打开 Visual Studio 选项并导航到:

Text EditorC#Advanced文本编辑器C#高级

and uncheck Insert * at the start of new lines when writing / / comments并在编写//注释时取消选中在新行开头插入*

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM