The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PrivateObject.GetArrayElement Method (String, BindingFlags, 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)

public object GetArrayElement(
	string name,
	BindingFlags bindingFlags,
	params int[] indices


Type: System.String

The variable name of array to get.


A bitmask comprised of one or more BindingFlags that specifies how the search for the element is conducted. The type of lookup need not be specified. The default value is GetField. If null is used, the default value is passed. Additional flags will be added to the mask.

Type: System.Int32[]

An array representing the location of the element to get.

Return Value

Type: System.Object

An object representing the array element.

Exception Condition

name is null.

Return to top