<param> (Visual Basic)

パラメーターの名前と説明を定義します。

構文

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

パラメーター

name
メソッド パラメーターの名前です。 名前は二重引用符 (" ") で囲みます。

description
パラメーターの説明です。

Remarks

<param> タグは、メソッドのいずれかのパラメーターを記述するために、メソッド宣言のコメントで使用する必要があります。

<param> タグのテキストは次の場所に表示されます。

  • IntelliSense のパラメーター ヒント。 詳細については、「IntelliSense の使用」を参照してください。

  • オブジェクト ブラウザー。 詳細については、「コードの構造の表示」を参照してください。

コンパイル時に -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

関連項目