<example> (Visual Basic)

メンバーの例を指定します。

構文

<example>description</example>  

パラメーター

description
コード例の説明です。

Remarks

<example> タグを使用すると、メソッドまたは他のライブラリ メンバーの使用例を指定できます。 一般的に、<code> タグが使用されます。

コンパイル時に -doc を指定して、ドキュメント コメントをファイルに出力します。

この例では、<example> タグを使用して、ID フィールドを使用する例を組み込みます。

Public Class Employee
    ''' <remarks>
    ''' <example> This sample shows how to set the <c>ID</c> field.
    ''' <code>
    ''' Dim alice As New Employee
    ''' alice.ID = 1234
    ''' </code>
    ''' </example>
    ''' </remarks>
    Public ID As Integer
End Class

関連項目