Export (0) Print
Expand All

PermissionSet.GetPermission Method

Gets a permission object of the specified type, if it exists in the set.

Namespace: System.Security
Assembly: mscorlib (in mscorlib.dll)

public IPermission GetPermission (
	Type permClass
)
public IPermission GetPermission (
	Type permClass
)
public function GetPermission (
	permClass : Type
) : IPermission

Parameters

permClass

The Type of the desired permission object.

Return Value

A copy of the permission object of the type specified by the permClass parameter contained in the PermissionSet, or a null reference (Nothing in Visual Basic) if none exists.

The method returns a null reference (Nothing in Visual Basic) for an UnrestrictedPermissionSet. Although an UnrestrictedPermissionSet effectively contains all permissions, it does not have any actual instances to return.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2015 Microsoft