DataProtectionPermission::Flags Property

 

Gets or sets the data and memory protection flags.

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

public:
property DataProtectionPermissionFlags Flags {
	DataProtectionPermissionFlags get();
	void set(DataProtectionPermissionFlags value);
}

Property Value

Type: System.Security.Permissions::DataProtectionPermissionFlags

A bitwise combination of the DataProtectionPermissionFlags values.

Exception Condition
ArgumentException

The specified value is not a valid combination of the DataProtectionPermissionFlags values.

This property specifies whether the Protect and Unprotect methods of the ProtectedData and ProtectedMemory classes can be used.

The following code example shows the use of the Flags property. This code example is part of a larger example provided for the DataProtectionPermission class.

Console::WriteLine( "Creating the intersection of the second and "
"first permissions." );
sp4 = dynamic_cast<DataProtectionPermission^>(sp2->Intersect( sp1 ));
Console::WriteLine( "The value of the Flags property is: {0}", sp4->Flags );

.NET Framework
Available since 2.0
Return to top
Show: