gpt4 book ai didi

c# - 如何防止在 C#/* */comments 中按下回车星号

转载 作者:太空狗 更新时间:2023-10-29 21:18:06 26 4
gpt4 key购买 nike

在 VS2012 C# 文本编辑器中,当在 /* */ 注释中按下 Enter 时,将添加以 * 开头的新行。是否可以禁用此行为并只获得一个空的新行?

从 Visual Studio 关于框,已安装的产品:

Microsoft Visual Studio Professional 2012Microsoft Team Explorer for Visual Studio 2012Microsoft Visual Basic 2012Microsoft Visual C# 2012Microsoft Visual C++ 2012Microsoft Visual F# 2012Microsoft® Visual Studio® 2012 Code Analysis Spell CheckerNuGet Package ManagerPreEmptive Analytics Visualizer

最佳答案

好像这个有annoyed other people很长一段时间,但如果您阅读该线程,您就会看到,有一个非直观的 hack 可以阻止它这样做。您必须将以下选项设置为未选中:

Text Editor > C# > Advanced > Generate XML documentation comments for///

截图如下:

screenshot

唯一的缺点是——正如原帖所说:

Unfortunately, turning this off not only disables the leading asterisk for block comments, but of course also disables the auto-complete feature for XML documentation comments.

关于c# - 如何防止在 C#/* */comments 中按下回车星号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16518745/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com