System.Security.Cryptography.X509Certificates.X509Certificate2Collection.Remove C# (CSharp) Method

Remove() public method

public Remove ( System certificate ) : void
certificate System
return void
        public void Remove(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate)
        {
        }

Same methods

X509Certificate2Collection::Remove ( X509Certificate2 certificate ) : void

Usage Example

示例#1
0
        /// <summary>
        /// Removes a certificate from an X.509 certificate store.
        /// </summary>
        /// <param name="certificate">The certificate to remove.</param>
        public void Remove(X509Certificate2 certificate)
        {
            if (certificate == null)
            {
                throw new ArgumentNullException();
            }

            if (!certificate.InternalCert.Delete(m_storeName))
            {
                throw new Exception();
            }

            if (m_certs != null)
            {
                m_certs.Remove(certificate);
            }
        }