Share via


BaseShadow.TransferArray Method

Performs a deep copy of an array of one Type into a similar array of different Type.

Namespace:  Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

Syntax

'Declaration
Protected Shared Function TransferArray ( _
    source As Array, _
    targetType As Type, _
    converter As BaseShadow.ElementConverter _
) As Array
protected static Array TransferArray(
    Array source,
    Type targetType,
    BaseShadow.ElementConverter converter
)
protected:
static Array^ TransferArray(
    Array^ source, 
    Type^ targetType, 
    BaseShadow::ElementConverter^ converter
)
static member TransferArray : 
        source:Array * 
        targetType:Type * 
        converter:BaseShadow.ElementConverter -> Array
protected static function TransferArray(
    source : Array, 
    targetType : Type, 
    converter : BaseShadow.ElementConverter
) : Array

Parameters

  • source
    Type: Array

    The source array.

  • targetType
    Type: Type

    The type of the target array.

Return Value

Type: Array
An array with the same characteristics (rank and dimension limitations) as the original array.

Remarks

Performs a deep copy of an array of one type into the same dimensioned array of a different type, for example arrayType1[2,3] to arrayType2[2,3]. The function looks deeply in array parameters, so that it also works on an array of arrays, for example arrayType1[2][3] to arrayType2[2][3].

.NET Framework Security

See Also

Reference

BaseShadow Class

Microsoft.VisualStudio.TestTools.UnitTesting Namespace