<value> (Visual Basic)
指定属性的说明。
语法
<value>property-description</value>
参数
property-description
属性的说明。
备注
使用 <value>
标记来描述属性。 请注意,在 Visual Studio 开发环境中使用代码向导添加属性时,将添加新属性的 <summary> 标记。 然后,应手动添加 <value>
标记,以描述属性表示的值。
使用 -doc 进行编译以便将文档注释处理到文件中。
示例
此示例使用 <value>
标记来描述 Counter
属性包含的值。
''' <summary>
''' Resets the value of 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