共用方式為


<範例> (Visual Basic)

指定成員的範例。

語法

<example>description</example>  

參數

description
程式代碼範例的描述。

備註

<example> 標記可讓您指定如何使用方法或其他程式庫成員的範例。 這通常牽涉到使用程式<代碼>標記。

使用 -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

另請參閱