Windows apps
Collapse the table of content
Expand the table of content

CopyTo Method (X509Certificate2[], Int32)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Copies the X509Certificate values in the current X509Certificate2Collection to a one-dimensional array at the specified index.

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

public:
void CopyTo(
	array<X509Certificate2^>^ array, 
	int index
)

Parameters

array
Type: array<System.Security.Cryptography.X509Certificates..::..X509Certificate2>[]()[][]
The one-dimensional array that is the destination of the elements in the collection.
index
Type: System..::..Int32
The index in array to begin copying.

The elements are copied to the array in the same order in which the enumerator iterates through the collection. This method is an O(n) operation, where n is Count.

Show:
© 2017 Microsoft