<value> (Visual Basic)

指定属性的说明。

<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)