System.Security.Permissions (mscorlib.dll)sealed class
public sealed class PermissionSetAttribute : CodeAccessSecurityAttribute {
// Public Constructors
   public PermissionSetAttribute(SecurityAction action);
// Public Instance Properties
   public string File{set; get; }
   public string Name{set; get; }
   public bool UnicodeEncoded{set; get; }
   public string XML{set; get; }
// Public Instance Methods
   public override IPermission CreatePermission(  );
// overrides SecurityAttribute
   public PermissionSet CreatePermissionSet(  );

The PermissionSetAttribute class supports the use of permission sets in declarative security statements. To specify the contents of the permission set, use one of mutually exclusive File, Name, or XML properties. File takes the name of a file that contains the permission set's XML definition. Name specifies one of the standard immutable named permission sets defined by the .NET Framework (FullTrust, SkipVerification, Execution, Nothing, LocalIntranet, or Internet). XML takes a System.String containing the XML definition of the permission set. To create a permission set that represents unrestricted access, set the Unrestricted property to true.

When required, the runtime calls the CreatePermissionSet( ) method to create a correctly configured System.Security.PermissionSet from the PermissionSetAttribute.


System.Object System.Attribute SecurityAttribute CodeAccessSecurityAttribute PermissionSetAttribute

Valid On

Assembly, Class, Struct, Constructor, Method

    Part V: API Quick Reference