Sets a permission to the System.Security.PermissionSet, replacing any existing permission of the same type.
![]()
The set permission.
This method removes any existing permission object of the same type from the System.Security.PermissionSet and replaces it with the perm parameter. If a permission that implements System.Security.Permissions.IUnrestrictedPermission is set on a System.Security.PermissionSet that is System.Security.Permissions.PermissionState.Unrestricted, the resulting System.Security.PermissionSet is no longer Unrestricted.