<c> (Visual Basic)

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

<c>text</c>

参数

Parameter

说明

text

希望将其指示为代码的文本。

备注

<c> 标记为您提供了一种方法,以指示说明中的文本应标记为代码。 使用 <code> (Visual Basic) 可将多行指示为代码。

使用 /doc 进行编译可以将文档注释处理为文件。

示例

本示例使用摘要一节中的 <c> 标记指示 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)