The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
CngKey::Delete Method ()
.NET Framework (current version)
Removes the key that is associated with the object.
Assembly: System.Core (in System.Core.dll)
| Exception | Condition |
|---|---|
| ObjectDisposedException | An attempt was made to access a deleted key. |
| CryptographicException | All other errors. |
When you call the Delete method on an ephemeral key, it closes the handle to the key.
When you call the Delete method on a named key, the CngKey object can no longer be used after the named key is deleted.
KeyContainerPermission
for permission to sign data. Demand value: Demand. Associated enumeration: KeyContainerPermissionFlags::Delete
.NET Framework
Available since 3.5
Available since 3.5
Show: