Редагувати

Поділитися через


<permission> documentation tag

The <permission> tag lets you document the access of a member. PermissionSet lets you specify access to a member.

Syntax

/// <permission cref="member">description</permission>

Parameters

member
A reference to a member or field that is available to be called from the current compilation environment. The compiler checks that the given code element exists and translates member to the canonical element name in the output XML. Enclose the name in single or double quotation marks.

The compiler issues a warning if it doesn't find member.

For information on how to create a cref reference to a generic type, see <see>.

description
A description of the access to the member.

Remarks

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

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 using the C++ lookup rules, the reference will be marked as unresolved. For more information, see <seealso>.

Example

// xml_permission_tag.cpp
// compile with: /clr /doc /LD
// post-build command: xdcmake xml_permission_tag.dll
using namespace System;
/// Text for class TestClass.
public ref class TestClass {
   /// <permission cref="System::Security::PermissionSet">Everyone can access this method.</permission>
   void Test() {}
};

See also

XML documentation