Copies the elements of the ICollection<(Of <(<'T>)>)> to an Array, starting at a particular Array index.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public void CopyTo( UsbRegistry[] array, int offset )
Public Sub CopyTo ( _ array As UsbRegistry(), _ offset As Integer _ )
public: void CopyTo( array<UsbRegistry^>^ array, int offset )
Parameters
- array (array<UsbRegistry>[]()[][])
- The one-dimensional Array that is the destination of the elements copied from ICollection<(Of <(<'T>)>)>. The Array must have zero-based indexing.
- offset (Int32)
- The zero-based index in Array at which copying begins.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | Offset is less than 0. |
ArgumentNullException | Array is null. |
ArgumentException | Array is multidimensional.-or-Offset is equal to or greater than the length of Array.-or-The number of elements in the source ICollection<(Of <(<'T>)>)> is greater than the available space from Offset to the end of the destination Array.-or-Type T cannot be cast automatically to the type of the destination Array. |