X509CertificateCollection.IndexOf Method

Searches for the specified X509Certificate and returns the zero-based index of the first occurrence within the entire X509CertificateCollection.

Namespace: Microsoft.Web.Services2.Security.X509
Assembly: Microsoft.Web.Services2 (in microsoft.web.services2.dll)

Usage

'Usage
Dim certificate As X509Certificate
Dim returnValue As Integer
Dim x509CertificateCollection1 As X509CertificateCollection
returnValue = x509CertificateCollection1.IndexOf(certificate)

Syntax

'Declaration
Public Function IndexOf( _
    ByVal certificate As X509Certificate _
) As Integer
public int IndexOf(
    X509Certificate certificate
);
public: Int32 IndexOf(
    X509Certificate^ certificate
);
public int IndexOf(
    X509Certificate certificate
);
public function IndexOf(
     certificate : X509Certificate
) : int;

Parameters

Return Value

The zero-based index of the first occurrence of certificatewithin the entire X509CertificateCollection, if found; otherwise, -1.

Exceptions

Exception type Condition
System.ArgumentNullException

certificateis null.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, and Windows 2000

Target Platforms

Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server, Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, Pocket PC, Windows CE, Smart Phone

See Also

Reference

X509CertificateCollection Class
Microsoft.Web.Services2.Security.X509 Namespace

Other Resources

X509CertificateCollection Members