<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

请参见

参考

建议的用于文档注释的 XML 标记 (Visual Basic)