Mono Class Library: System.Security.PermissionSet Overview | Members

System.Security.PermissionSet.AddPermission Method

Adds the specified System.Security.IPermission object to the current instance if that permission does not already exist in the current instance.

public IPermission AddPermission (IPermission perm)

Parameters

perm
The System.Security.IPermission object to add.

Returns

If perm is null, returns null . If a permission of the same type as perm already exists in the current instance, the union of the existing permission and perm is added to the current instance and is returned.

Exceptions

TypeReason
ArgumentExceptionperm is not a System.Security.IPermission object.

Remarks

Operation
The System.Security.IPermission is added if perm is not null and a permission of the same type as perm does not already exist in the current instance.

Usage
Use this method to add permission objects to the current instance.

Requirements

Namespace: System.Security
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0