ReadOnlyDictionary<K, V>.CopyTo Method

Copies the elements of the ReadOnlyDictionary to an System.Array, starting at a particular System.Array index.

Namespace:  Microsoft.Rtc.Collaboration.AudioVideo
Assembly:  Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)

Syntax

'Declaration
Public Sub CopyTo ( _
    array As KeyValuePair(Of K, V)(), _
    arrayIndex As Integer _
)
'Usage
Dim instance As ReadOnlyDictionary
Dim array As KeyValuePair(Of K, V)()
Dim arrayIndex As Integer

instance.CopyTo(array, arrayIndex)
public void CopyTo(
    KeyValuePair<K, V>[] array,
    int arrayIndex
)

Parameters

  • array
    Type: []
    The one-dimensional System.Array that is the destination of the elements copied from ReadOnlyDictionary. The System.Array must have zero-based indexing.
  • arrayIndex
    Type: System.Int32
    The zero-based index in array at which copying begins.

Implements

ICollection<T>.CopyTo([], Int32)

Exceptions

Exception Condition
ArgumentOutOfRangeException

Thrown when arrayIndex is less than 0.

ArgumentNullException

Thrown when array is null.

ArgumentException

Thrown when array is multidimensional, or when arrayIndex is greater than or equal to the length of array, or when the number of elements in the source ReadOnlyDictionalr is greater than the available space from arrayIndex to the end of the destination, or when Type T cannot be cast automatically to the type of the destination array.

See Also

Reference

ReadOnlyDictionary<K, V> Class

ReadOnlyDictionary<K, V> Members

Microsoft.Rtc.Collaboration.AudioVideo Namespace