如何在 IntelliSense 中为 Visual Studio 中的函数添加注释? [英] How to have comments in IntelliSense for function in Visual Studio?

查看:35
本文介绍了如何在 IntelliSense 中为 Visual Studio 中的函数添加注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Visual Studio 和 C# 中,当使用内置函数(例如 ToString())时,IntelliSense 会显示一个黄色框,说明它的作用.

In Visual Studio and C#, when using a built in function such as ToString(), IntelliSense shows a yellow box explaining what it does.

我如何为我编写的函数和属性使用它?

推荐答案

要生成一个区域,您可以在其中指定函数的描述和函数的每个参数,请在函数前的行中键入以下内容并点击 输入:

To generate an area where you can specify a description for the function and each parameter for the function, type the following on the line before your function and hit Enter:

  • C#: ///

VB: '''

请参阅文档注释的推荐标签(C# 编程指南),了解有关您可以在这些评论中包含的结构化内容的更多信息.

See Recommended Tags for Documentation Comments (C# Programming Guide) for more info on the structured content you can include in these comments.

这篇关于如何在 IntelliSense 中为 Visual Studio 中的函数添加注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆