Condividi tramite


PrivateObject.GetArrayElement Method (String, BindingFlags, 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, _
    bindingFlags As BindingFlags, _
    ParamArray indices As Integer() _
) As Object
public Object GetArrayElement(
    string name,
    BindingFlags bindingFlags,
    params int[] indices
)
public:
Object^ GetArrayElement(
    String^ name, 
    BindingFlags bindingFlags, 
    ... array<int>^ indices
)
member GetArrayElement : 
        name:string * 
        bindingFlags:BindingFlags * 
        indices:int[] -> Object
public function GetArrayElement(
    name : String, 
    bindingFlags : BindingFlags, 
    ... indices : int[]
) : Object

Parameters

  • name
    Type: String

    The variable name of array to get.

  • bindingFlags
    Type: BindingFlags
  • indices
    Type: array<Int32[]

    An array representing the location of the element to get.

Return Value

Type: Object
An object representing 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