Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 963 Bytes

returns-visual-cpp.md

File metadata and controls

44 lines (32 loc) · 963 Bytes
title <returns> (Visual C++)
ms.date 11/04/2016
f1_keywords
returns
<returns>
helpviewer_keywords
returns C++ XML tag
<returns> C++ XML tag
ms.assetid 5e3b0ed9-838d-4953-a93e-76d2d0a19fb9

<returns> (Visual C++)

The <returns> tag should be used in the comment for a method declaration to describe the return value.

Syntax

<returns>description</returns>

Parameters

description
A description of the return value.

Remarks

Compile with /doc to process documentation comments to a file.

Example

// 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; }
};

See Also

XML Documentation