PermissionSet.RemovePermission(Type) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Removes a permission of a certain type from the set.
public:
System::Security::IPermission ^ RemovePermission(Type ^ permClass);
public:
virtual System::Security::IPermission ^ RemovePermission(Type ^ permClass);
public System.Security.IPermission? RemovePermission(Type? permClass);
public virtual System.Security.IPermission RemovePermission(Type permClass);
public System.Security.IPermission RemovePermission(Type permClass);
member this.RemovePermission : Type -> System.Security.IPermission
abstract member RemovePermission : Type -> System.Security.IPermission
override this.RemovePermission : Type -> System.Security.IPermission
Public Function RemovePermission (permClass As Type) As IPermission
Public Overridable Function RemovePermission (permClass As Type) As IPermission
Parameters
- permClass
- Type
The type of permission to delete.
Returns
The permission removed from the set.
Exceptions
The method is called from a ReadOnlyPermissionSet.
Remarks
Important
You cannot remove permissions from an unrestricted permission set. The permission set remains unrestricted after you attempt to remove the permission, and no exception is thrown.
Notes to Inheritors
When you inherit from PermissionSet, you can change the behavior of the RemovePermission(Type) method by overriding the RemovePermissionImpl(Type) method.