Share via


<permission> (Visual Basic)

Specifies a required permission for the member.

<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 member in quotation marks (" ").

  • description
    A description of the access to the member.

Remarks

Use the <permission> tag to document the access of a member. Use the PermissionSet class to specify access to a member.

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

Example

This example uses the <permission> tag to describe that the FileIOPermission is required by the ReadFile method.

''' <permission cref="System.Security.Permissions.FileIOPermission"> 
''' Needs full access to the specified file. 
''' </permission> 
Public Sub ReadFile(ByVal filename As String)
    ' Code goes here. 
End Sub

See Also

Reference

Recommended XML Tags for Documentation Comments (Visual Basic)