다음을 통해 공유


PrivateObject.GetArrayElement Method (String, array<Int32 )

Gets the array element by using an array of subscripts for each dimension.

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

Syntax

'Declaration
Public Function GetArrayElement ( _
    name As String, _
    ParamArray indices As Integer() _
) As Object
public Object GetArrayElement(
    string name,
    params int[] indices
)
public:
Object^ GetArrayElement(
    String^ name, 
    ... array<int>^ indices
)
member GetArrayElement : 
        name:string * 
        indices:int[] -> Object
public function GetArrayElement(
    name : String, 
    ... indices : int[]
) : Object

Parameters

  • name
    Type: String

    The variable name of array to get.

  • indices
    Type: array<Int32[]

    An array that represents the location of the element to get.

Return Value

Type: Object
An object that represents the array element.

Exceptions

Exception Condition
ArgumentNullException

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

.NET Framework Security

See Also

Reference

PrivateObject Class

GetArrayElement Overload

Microsoft.VisualStudio.TestTools.UnitTesting Namespace