GacIdentityPermission Constructor (PermissionState)
Collapse the table of content
Expand the table of content

GacIdentityPermission Constructor (PermissionState)

 

Initializes a new instance of the GacIdentityPermission class with fully restricted PermissionState.

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

public GacIdentityPermission(
	PermissionState state
)

Parameters

state
Type: System.Security.Permissions.PermissionState

One of the PermissionState values.

Exception Condition
ArgumentException

state is not a valid PermissionState value.

System_CAPS_noteNote

In the .NET Framework versions 1.0 and 1.1, identity permissions cannot have an Unrestricted permission state value. Starting with the .NET Framework version 2.0, identity permissions can have any permission state value. This means that in 2.0 and later versions, identity permissions have the same behavior as permissions that implement the IUnrestrictedPermission interface.

The following code example shows the use of the GacIdentityPermission.GacIdentityPermission(PermissionState) constructor.

GacIdentityPermission Gac1 = new GacIdentityPermission(PermissionState.None);

.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft