Share via


<permission> (Visual C++)

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at <permission> (Visual C++).

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 does not 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 Visual C++ compiler will attempt to resolve cref references in one pass through the documentation comments. Therefore, if using the C++ lookup rules, a symbol is not found by the compiler the reference will be marked as unresolved. See <seealso> for more information.

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