Share via


PrivateObject.SetArrayElement Method (String, BindingFlags, Object, array<Int32 )

Sets 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 Sub SetArrayElement ( _
    name As String, _
    bindingFlags As BindingFlags, _
    value As Object, _
    ParamArray indices As Integer() _
)
public void SetArrayElement(
    string name,
    BindingFlags bindingFlags,
    Object value,
    params int[] indices
)
public:
void SetArrayElement(
    String^ name, 
    BindingFlags bindingFlags, 
    Object^ value, 
    ... array<int>^ indices
)
member SetArrayElement : 
        name:string * 
        bindingFlags:BindingFlags * 
        value:Object * 
        indices:int[] -> unit
public function SetArrayElement(
    name : String, 
    bindingFlags : BindingFlags, 
    value : Object, 
    ... indices : int[]
)

Parameters

  • name
    Type: String

    The variable name of array to set.

  • bindingFlags
    Type: BindingFlags
  • value
    Type: Object

    The value to assign to the array element.

  • indices
    Type: array<Int32[]

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

.NET Framework Security

See Also

Reference

PrivateObject Class

SetArrayElement Overload

Microsoft.VisualStudio.TestTools.UnitTesting Namespace