CertificateStoreDeleteCertificate Method |
Removes the specified certificate from the store.
Namespace: MailBee.SecurityAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public bool DeleteCertificate(
Certificate cert
)
Public Function DeleteCertificate (
cert As Certificate
) As Boolean
Parameters
- cert
- Type: MailBee.SecurityCertificate
The certificate that should be removed from the store.
Return Value
Type:
Booleantrue if the specified certificate was successfully removed; otherwise,
false.
Exceptions Remarks Examples This sample removes all certificates having the specified e-mail address from the store.
using MailBee.Security;
CertificateStore store = new CertificateStore("TestStore", CertStoreType.System, null);
CertificateCollection coll = store.FindCertificates("user@domain.com", CertificateFields.EmailAddress);
foreach (Certificate cert in coll)
{
store.DeleteCertificate(cert);
}
Imports MailBee.Security
Dim store As CertificateStore = New CertificateStore("TestStore", CertStoreType.System, Nothing)
Dim coll As CertificateCollection = store.FindCertificates("user@domain.com", CertificateFields.EmailAddress)
For Each cert As Certificate In coll
store.DeleteCertificate(cert)
Next
See Also