CngKey.Delete CngKey.Delete CngKey.Delete CngKey.Delete Method

Definition

Removes the key that is associated with the object.

public:
 void Delete();
[System.Security.SecurityCritical]
public void Delete ();
member this.Delete : unit -> unit
Public Sub Delete ()

Exceptions

Remarks

  • 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.

Security

KeyContainerPermission
for permission to sign data. Demand value: Demand. Associated enumeration: Delete

Applies to