Opc.Ua.CertificateIdentifierCollection.Delete C# (CSharp) Method

Delete() public method

Deletes a certificate from the store.
public Delete ( string thumbprint ) : Task
thumbprint string The thumbprint.
return Task
        public async Task<bool> Delete(string thumbprint)
        {
            if (String.IsNullOrEmpty(thumbprint))
            {
                return false;
            }

            for (int ii = 0; ii < this.Count; ii++)
            {
                X509Certificate2 certificate = await this[ii].Find(false);

                if (certificate != null && certificate.Thumbprint == thumbprint)
                {
                    this.RemoveAt(ii);
                    return true;
                }
            }

            return false;
        }