简体   繁体   English

如何在 Visual Studio Code 中为 C# 函数、类生成代码注释?

[英]How to generate code comment for C# function, class in Visual Studio Code?

I need input /// and then ENTER to generate comment for functions or classes.我需要输入 /// 然后 ENTER 来为函数或类生成注释。

Any help?有什么帮助吗?

You can use Ctrl-K, Ctrl-C to create marks the current line or selected lines of code as a comment, using the correct comment syntax for the programming language.您可以使用 Ctrl-K、Ctrl-C 来创建标记当前行或所选代码行作为注释,使用编程语言的正确注释语法。

Hope it helps you :)希望对你有帮助:)

If this is still an issue for you guys, there's an extension that helps you with this: C# XML Documentation comments.如果这对你们来说仍然是个问题,那么有一个扩展可以帮助您解决这个问题:C# XML 文档注释。 It can be found here: https://marketplace.visualstudio.com/items?itemName=k--kato.docomment可以在这里找到: https : //marketplace.visualstudio.com/items?itemName=k--kato.docomment

Typing /// would generate a new comments section.键入 /// 将生成一个新的评论部分。

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

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