如何为函数和函数参数添加描述? [英] How to add description to functions and function parameters?

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

问题描述

我正在编写一个带有大量重载的 VB.NET 函数.我已经看到大多数 .NET 函数在 IntelliSense 中都有参数描述.例如,当输入 String.Compare( 时,IntelliSense 说 比较两个指定的 System.String 对象并返回... 你明白了.这个描述改变了,你点击通过相同函数的不同重载版本.当您开始为参数输入某些内容时,它也会描述您当前输入的参数.示例:strA:要比较的第一个字符串..

I'm writing a VB.NET function with a ton of overloads. I've seen that most .NET functions have parameter descriptions in IntelliSense. For example, when typing in String.Compare(, IntelliSense says Compares two specified System.String objects and returns... you get the idea. This description changes and you click through different overloaded versions of the same functions. When you start typing in something for a parameter, it describes the parameter you're currently inputting as well. Example: strA: The first string to compare..

我怎样才能对我的函数进行这样的描述?

How can I give such descriptions to my functions?

推荐答案

您所要做的就是在您的函数之前的行上键入三个撇号..NET 将为您添加其余的代码.在标签中插入想要在智能感知中显示的文本.

All you have to do is key three apostrophes on the line before your function. .NET will add the rest of the code for you. Insert the text you want displayed in the intellisense in the tag.

''' <summary>
''' Returns the name of the code.
''' </summary>
Function GetName() As String
    Return "Something"
End Function

这篇关于如何为函数和函数参数添加描述?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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