描述每个参数 [英] Discription of every parameter

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

问题描述



i想创建一个物品,并且每个参数想要显示参数应该如何显示的说明

例如

 < span class =code-keyword>公共  Sub  Print_TITEM( ByVal 状态作为 字符串 ByVal 键入作为 字符串
sb.AppendLine( TITEM& Lcount(LineCount)& Status& Type)
LineCount + = 1

结束 Sub



像这样很多的药品都在那里,很多人在我2后使用这个类

所以我需要展示参数应该如何与空间没有空间等..

喜欢视觉效果工作室显​​示标准函数

解决方案

它被称为XML文档,你可以在这里阅读: http://msdn.microsoft.com/en-us/library/ms172652.aspx [ ^ ]



设置生成XML文档文件在项目菜单中,单击属性,编译页面。

然后在你的方法前键入'''。



 '''  <  摘要 < span class =code-summarycomment>>  
''' 您的方法说明
''' < ; / summary >
''' < param name =Status > 描述参数在这里做什么< / param >
''' < param name =Type > 描述参数在这里做什么< / param < span class =code-summarycomment>>
公开 Sub Print_TITEM(状态作为 字符串,键入 As 字符串
sb.AppendLine( TITEM& Lcount(LineCount)&现状&类型)
LineCount + = 1
结束


Hi,
i want to create a methood and for every parameter want to show discription that how the parameter should be
eg

Public Sub Print_TITEM(ByVal Status As String, ByVal Type As String)
    sb.AppendLine("TITEM" & Lcount(LineCount) & Status & Type)
    LineCount += 1

End Sub


like this many methoods are there and many after me going 2 use this class
so i need to show how the parameter should be with space without space etc..
like how visual studio shows for standard functions

解决方案

It's called "XML Documentation", and you can read about it here: http://msdn.microsoft.com/en-us/library/ms172652.aspx[^]

Set "Generate XML documentation file" in Project menu, click Properties, Compile page.
Then type ''' before your method.

''' <summary>
''' Your method description here
''' </summary>
''' <param name="Status">Describe what the parameter does here</param>
''' <param name="Type">Describe what the parameter does here</param>
Public Sub Print_TITEM(Status As String, Type As String)
    sb.AppendLine("TITEM" & Lcount(LineCount) & Status & Type)
    LineCount += 1
End Sub


这篇关于描述每个参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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