KeyContainerPermission Constructor (KeyContainerPermissionFlags)

 

Initializes a new instance of the KeyContainerPermission class with the specified access.

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

public:
KeyContainerPermission(
	KeyContainerPermissionFlags flags
)

Parameters

flags
Type: System.Security.Permissions::KeyContainerPermissionFlags

A bitwise combination of the KeyContainerPermissionFlags values.

Exception Condition
ArgumentException

flags is not a valid combination of the KeyContainerPermissionFlags values.

The following code example shows the use of the KeyContainerPermission::KeyContainerPermission(KeyContainerPermissionFlags) constructor.

// Create a KeyContainerPermission with the right to open the key container.
KeyContainerPermission ^ keyContainerPerm = gcnew KeyContainerPermission( KeyContainerPermissionFlags::Open );

.NET Framework
Available since 2.0
Return to top
Show: