Partager via


LoadTestUserContext.CopyTo Method

Copies the elements of the LoadTestUserContext 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

  • array
    Type: array<KeyValuePair<String, Object>[]

    The one-dimensional Array that is the destination of the elements that are copied from the LoadTestUserContext. The array must have zero-based indexing.

  • arrayIndex
    Type: Int32

    The zero-based index in the array at which copying starts.

Implements

ICollection.CopyTo(UTP, 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 LoadTestUserContext is greater than the available space from arrayIndex to the end of the destination array.

.NET Framework Security

See Also

Reference

LoadTestUserContext Class

Microsoft.VisualStudio.TestTools.LoadTesting Namespace