Share via


X509Certificate2Collection.Contains Method (X509Certificate2)

Determines whether a X509Certificate2Collection object contains a specific certificate.

Namespace: System.Security.Cryptography.X509Certificates
Assembly: System.Security (in system.security.dll)

Syntax

public bool Contains (
         X509Certificate2 value
)

Parameters

  • value
    The X509Certificate2 object to locate in the collection.

Return Value

true if the X509Certificate2Collection contains the specified certificate; otherwise, false.

Remarks

This method performs a linear search; therefore, the average execution time is proportional to the Count property. That is, this method is an O(n) operation, where n is Count. This method determines equality by calling the Object.Equals method.

Version Information

Available in the .NET Micro Framework version 4.2.

See Also

Reference

X509Certificate2Collection Class
X509Certificate2Collection Members
System.Security.Cryptography.X509Certificates Namespace