共用方式為


<value> (Visual Basic)

更新:2007 年 11 月

指定屬性的說明。

 <value>property-description</value>

參數

  • property-description
    屬性的描述。

備註

使用 <value> 標記來說明屬性。請注意,當您透過 Visual Studio 開發環境的程式碼精靈加入屬性時,該精靈會為新屬性加上 <summary> (Visual Basic) 標記。接著,您必須手動加入 <value> 標記,來說明該屬性所表示的值。

使用 /doc 進行編譯,將文件註解處理為檔案。

範例

這個範例會使用 <value> 標記,來說明 Counter 屬性要保存哪個值。

''' <summary>
''' Resets the value the <c>Counter</c> field.
''' </summary>
Public Sub ResetCounter()
    counterValue = 0
End Sub
Private counterValue As Integer = 0
''' <summary>
''' Returns the number of times Counter was called.
''' </summary>
''' <value>Number of times Counter was called.</value>
Public ReadOnly Property Counter() As Integer
    Get
        counterValue += 1
        Return counterValue
    End Get
End Property

請參閱

參考

建議可用於文件註解的 XML 標記 (Visual Basic)