Partilhar via


NormalizedSnapshotSpanCollection.CopyTo Method (array<SnapshotSpan , Int32)

Copies the collection to the specified array of snapshot spans at the specified location.

Namespace:  Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

Syntax

'Declaração
Public Sub CopyTo ( _
    array As SnapshotSpan(), _
    arrayIndex As Integer _
)
public void CopyTo(
    SnapshotSpan[] array,
    int arrayIndex
)
public:
virtual void CopyTo(
    array<SnapshotSpan>^ array, 
    int arrayIndex
) sealed
abstract CopyTo : 
        array:SnapshotSpan[] * 
        arrayIndex:int -> unit 
override CopyTo : 
        array:SnapshotSpan[] * 
        arrayIndex:int -> unit 
public final function CopyTo(
    array : SnapshotSpan[], 
    arrayIndex : int
)

Parameters

  • arrayIndex
    Type: System.Int32
    The location to which to start copying the snapshot spans.

Implements

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

Exceptions

Exception Condition
ArgumentNullException

array is nulla null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

arrayIndex is negative or greater than the array length, or the number of spans in the collection is greater than the length of the array minus the array index.

.NET Framework Security

See Also

Reference

NormalizedSnapshotSpanCollection Class

CopyTo Overload

Microsoft.VisualStudio.Text Namespace