<returns> 文档标记

在方法声明的注释中应使用 <returns> 标记来描述返回值。

语法

/// <returns>description</returns>

参数

description
返回值的说明。

备注

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

示例

// xml_returns_tag.cpp
// compile with: /LD /clr /doc
// post-build command: xdcmake xml_returns_tag.dll

/// Text for class MyClass.
public ref class MyClass {
public:
   /// <returns>Returns zero.</returns>
   int GetZero() { return 0; }
};

另请参阅

XML 文档