PrivateKey.Delete method
[The Delete method is available for use in the operating systems specified in the Requirements section. Instead, use the X509Certificate2.PrivateKey Property in the System.Security.Cryptography.X509Certificates namespace.]
Applies to: desktop apps only
The Delete method deletes the private key container referenced by the PrivateKey object.
Syntax
PrivateKey.Delete()
Parameters
This method has no parameters.
Return value
This method does not return a value.
Remarks
Important This method deletes the private key container referenced by the PrivateKey object as well as all private keys in the container. Anything encrypted using the public keys corresponding to the deleted private keys will no longer be able to be decrypted.
This method raises CAPICOM_E_NOT_ALLOWED when it is scripted from a web-based application.
Requirements
|
Redistributable | CAPICOM 2.0 or later on Windows Server 2003, Windows XP, Windows 2000 Server with SP3 and later, and Windows 2000 Professional with SP3 and later |
|---|---|
|
DLL |
|
Send comments about this topic to Microsoft
Build date: 3/6/2012