NamedPermissionSet Constructor (String, PermissionState)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Initializes a new instance of the NamedPermissionSet class with the specified name in either an unrestricted or a fully restricted state.

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

public NamedPermissionSet(
	string name,
	PermissionState state


Type: System.String

The name for the new named permission set.

Type: System.Security.Permissions.PermissionState

One of the PermissionState values.

Exception Condition

The name parameter is null or is an empty string ("").

A named permission set in an unrestricted state effectively contains all permissions that implement the IUnrestrictedPermission interface. The named permission set will contain all built-in permissions as well as all custom permissions. All permissions will have an UnrestrictedPermissionState. Permissions that do not implement IUnrestrictedPermission, such as identity permissions, will be empty instances.

.NET Framework
Available since 1.1
Return to top