<value> (Visual Basic)<value> (Visual Basic)

指定属性的说明。Specifies the description of a property.

语法Syntax

<value>property-description</value>  

参数Parameters

property-description
属性的说明。A description for the property.

备注Remarks

使用 <value> 标记来描述属性。Use the <value> tag to describe a property. 请注意,当您使用 Visual Studio 开发环境中的代码向导添加属性时,它将 <summary> 为新属性添加标记。Note that when you add a property using the code wizard in the Visual Studio development environment, it will add a <summary> tag for the new property. 然后,应手动添加 <value> 标记,以描述属性表示的值。You should then manually add a <value> tag to describe the value that the property represents.

使用 -doc 进行编译以便将文档注释处理到文件中。Compile with -doc to process documentation comments to a file.

示例Example

此示例使用 <value> 标记来描述属性包含的值 CounterThis example uses the <value> tag to describe what value the Counter property holds.

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

另请参阅See also