This documentation is archived and is not being maintained.

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
)

Parameters

name
Type: String

The variable name of array to get.

bindingFlags
Type: BindingFlags
indices
Type: Int32[]

An array representing the location of the element to get.

Return Value

Type: Object
An object representing the array element.

ExceptionCondition
ArgumentNullException

name is null.

Show: