共用方式為


<param> (Visual Basic)

更新:2007 年 11 月

定義參數名稱和描述。

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

參數

  • name
    為方法參數的名稱。以雙引號 (" ") 將名稱括起來。

  • description
    參數的描述。

備註

<param> 標記 (Tag) 應使用於方法宣告的註解中,以描述該方法的其中一個參數。

<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)