<param> (Visual Basic)

定义参数名称和说明。

语法

<param name="name">description</param>  

参数

name
方法参数的名称。 用双引号将名称括起来(“ )。

description
参数的说明。

注解

在方法声明的注释中,应使用 <param> 标记来描述方法参数之一。

标记的文本 <param> 将显示在以下位置:

使用 -doc 编译以处理对文件的文档注释。

示例:

此示例使用 <param> 标记来描述 id 参数。

''' <param name="id">The ID of the record to update.</param>
''' <remarks>Updates the record <paramref name="id"/>.
''' <para>Use <see cref="DoesRecordExist"/> to verify that
''' the record exists before calling this method.</para>
''' </remarks>
Public Sub UpdateRecord(ByVal id As Integer)
    ' Code goes here.
End Sub
''' <param name="id">The ID of the record to check.</param>
''' <returns><c>True</c> if <paramref name="id"/> exists,
''' <c>False</c> otherwise.</returns>
''' <remarks><seealso cref="UpdateRecord"/></remarks>
Public Function DoesRecordExist(ByVal id As Integer) As Boolean
    ' Code goes here.
End Function

另请参阅