Rediger

Del via


<see> documentation tag

The <see> tag lets you specify a link from within text. Use <seealso> to indicate text that you might want to appear in a See also section.

Syntax

/// <see cref="member"/>

Parameters

member
A reference to a member or field that is available to be called from the current compilation environment. Enclose the name in single or double quotation marks.

The compiler checks that the given code element exists and resolves member to the element name in the output XML. The compiler issues a warning if it doesn't find member.

Remarks

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

For an example of using <see>, see <summary>.

The MSVC compiler will attempt to resolve cref references in one pass through the documentation comments. If the compiler doesn't find a symbol when it's using the C++ lookup rules, it marks the reference as unresolved. For more information, see <seealso>.

Example

The following sample shows how you can make cref reference to a generic type so the compiler will resolve the reference.

// xml_see_cref_example.cpp
// compile with: /LD /clr /doc
// the following cref shows how to specify the reference, such that,
// the compiler will resolve the reference
/// <see cref="C{T}">
/// </see>
ref class A {};

// the following cref shows another way to specify the reference,
// such that, the compiler will resolve the reference
/// <see cref="C < T >"/>

// the following cref shows how to hard-code the reference
/// <see cref="T:C`1">
/// </see>
ref class B {};

/// <see cref="A">
/// </see>
/// <typeparam name="T"></typeparam>
generic<class T>
ref class C {};

See also

XML documentation