CngKey::HasProperty Method (String^, CngPropertyOptions)
Checks to see whether the specified property exists on the key.
Assembly: System.Core (in System.Core.dll)
public: [SecurityPermissionAttribute(SecurityAction::Demand, UnmanagedCode = true)] bool HasProperty( String^ name, CngPropertyOptions options )
Parameters
- name
-
Type:
System::String^
The property name to check.
- options
-
Type:
System.Security.Cryptography::CngPropertyOptions
A bitwise combination of the enumeration values that specify options for the named property.
| Exception | Condition |
|---|---|
| ArgumentNullException | name is null. |
The options parameter is specifically used to indicate the following:
Whether the property is built-in, or custom.
Whether the property should be persisted with the key.
These options must match the value that the property was set with, or the property will not be found.
This method operates correctly even if the property is set to false or zero.
for permission to call unmanaged code. Demand value: LinkDemand. Associated enumeration: SecurityPermissionFlag::UnmanagedCode
Available since 3.5