<c> 文档标记

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

语法

/// <c>text</c>

参数

text
要指示为代码的文本。

注解

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

示例

// xml_c_tag.cpp
// compile with: /doc /LD
// post-build command: xdcmake xml_c_tag.xdc

/// Text for class MyClass.
class MyClass {
public:
   int m_i;
   MyClass() : m_i(0) {}

   /// <summary><c>MyMethod</c> is a method in the <c>MyClass</c> class.
   /// </summary>
   int MyMethod(MyClass * a) {
      return a -> m_i;
   }
};

另请参阅

XML 文档