Chỉnh sửa

PermissionSet.RemovePermission(Type) Method

Definition

Removes a permission of a certain type from the set.

public:
 System::Security::IPermission ^ RemovePermission(Type ^ permClass);
public System.Security.IPermission? RemovePermission(Type? permClass);
member this.RemovePermission : Type -> System.Security.IPermission
Public 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.

Applies to