Share via


LoadTestContext.CopyTo Method

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

Namespace:  Microsoft.VisualStudio.TestTools.LoadTesting
Assembly:  Microsoft.VisualStudio.QualityTools.LoadTestFramework (in Microsoft.VisualStudio.QualityTools.LoadTestFramework.dll)

Syntax

'Declaration
Public Sub CopyTo ( _
    array As KeyValuePair(Of String, Object)(), _
    arrayIndex As Integer _
)
public void CopyTo(
    KeyValuePair<string, Object>[] array,
    int arrayIndex
)
public:
virtual void CopyTo(
    array<KeyValuePair<String^, Object^>>^ array, 
    int arrayIndex
) sealed
abstract CopyTo : 
        array:KeyValuePair<string, Object>[] * 
        arrayIndex:int -> unit 
override CopyTo : 
        array:KeyValuePair<string, Object>[] * 
        arrayIndex:int -> unit 
public final function CopyTo(
    array : KeyValuePair<String, Object>[], 
    arrayIndex : int
)

Parameters

  • arrayIndex
    Type: System.Int32
    The zero-based index in the array at which copying starts.

Implements

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

Exceptions

Exception Condition
ArgumentNullException

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

ArgumentOutOfRangeException

arrayIndex is less than 0.

ArgumentException

array is multidimensional.

-or-

The number of elements in the source LoadTestContext is greater than the available space from arrayIndex to the end of the destination array.

.NET Framework Security

See Also

Reference

LoadTestContext Class

Microsoft.VisualStudio.TestTools.LoadTesting Namespace