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

Find() public method

public Find ( System findType, object findValue, bool validOnly ) : System.Security.Cryptography.X509Certificates.X509Certificate2Collection
findType System
findValue object
validOnly bool
return System.Security.Cryptography.X509Certificates.X509Certificate2Collection
        public System.Security.Cryptography.X509Certificates.X509Certificate2Collection Find(System.Security.Cryptography.X509Certificates.X509FindType findType, object findValue, bool validOnly)
        {
            throw null;
        }

Same methods

X509Certificate2Collection::Find ( X509FindType findType, object findValue, bool validOnly ) : X509Certificate2Collection

Usage Example

        // dotnet/wcf#1574 - This is a workaround for dotnet/corefx#12214
        // The copy constructor was removed in .NET Core, this is the workaround to allow us to make copies of certificates

        internal static X509Certificate2 CloneCertificateInternal(this X509Certificate2 certificateToClone)
        {
#if TARGETS_WINDOWS
            return new X509Certificate2(certificateToClone.Handle);
#else
            X509Certificate2Collection collection = new X509Certificate2Collection(certificateToClone);
            X509Certificate2Collection copyCollection = collection.Find(X509FindType.FindByThumbprint, certificateToClone.Thumbprint, false);
            return copyCollection[0];
#endif
        }
All Usage Examples Of System.Security.Cryptography.X509Certificates.X509Certificate2Collection::Find