<c> (Visual Basic)

指示说明中的文本是代码。

语法

<c>text</c>  

参数设置

参数 说明
text 要指示为代码的文本。

备注

使用 <c> 标记可以指示应将说明内的文本标记为代码。 使用 <code> 指示作为代码的多行文本。

使用 -doc 进行编译以便将文档注释处理到文件中。

示例

此示例使用摘要部分中的 <c> 标记来指示 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

另请参阅