<值> (Visual Basic)

指定属性的说明。

语法

<value>property-description</value>  

参数

property-description
属性的说明。

注解

使用 <value> 标记描述属性。 请注意,在 Visual Studio 开发环境中使用代码向导添加属性时,它将为新属性添加 <摘要> 标记。 然后,应手动添加标记 <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

另请参阅