This documentation is archived and is not being maintained.

X509CertificateCollection.CopyTo Method

Copies the X509Certificate values in the current X509CertificateCollection to a one-dimensional Array instance at the specified index.

[Visual Basic]
Public Sub CopyTo( _
   ByVal array() As X509Certificate, _
   ByVal index As Integer _
)
[C#]
public void CopyTo(
 X509Certificate[] array,
 int index
);
[C++]
public: void CopyTo(
 X509Certificate* array[],
 int index
);
[JScript]
public function CopyTo(
   array : X509Certificate[],
 index : int
);

Parameters

array
The one-dimensional Array that is the destination of the values copied from X509CertificateCollection.
index
The index into array to begin copying.

Exceptions

Exception Type Condition
ArgumentException The array parameter is multidimensional.

-or-

The number of elements in the X509CertificateCollection is greater than the available space between arrayIndex and the end of array.

ArgumentNullException The array parameter is a null reference (Nothing in Visual Basic).
ArgumentOutOfRangeException The arrayIndex parameter is less than the array parameter's lower bound.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

X509CertificateCollection Class | X509CertificateCollection Members | System.Security.Cryptography.X509Certificates Namespace | Array

Show: