Copies the entire
System.Collections.ObjectModel.ReadOnlyCollection`1 to a compatible one-dimensional
System.Array, starting at the specified index of the target array.
Syntax
| Visual Basic (Declaration) | |
|---|
Public Sub CopyTo( _
ByVal array() As Member, _
ByVal index As System.Integer _
) |
Parameters
- array
- The one-dimensional System.Array that is the destination of the elements copied from System.Collections.ObjectModel.ReadOnlyCollection`1. The System.Array must have zero-based indexing.
- index
- The zero-based index in array at which copying begins.
Exceptions
| Exception | Description |
| System.ArgumentNullException | array is null. |
| System.ArgumentOutOfRangeException | index is less than zero. |
| System.ArgumentException | The number of elements in the source System.Collections.ObjectModel.ReadOnlyCollection`1 is greater than the available space from index to the end of the destination array. |
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also