Condividi tramite


PrivateType.SetStaticArrayElement Method (String, BindingFlags, Object, array<Int32 )

Sets a static array element contained in the wrapped type.

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

Syntax

'Declaration
Public Sub SetStaticArrayElement ( _
    name As String, _
    bindingFlags As BindingFlags, _
    value As Object, _
    ParamArray indices As Integer() _
)
public void SetStaticArrayElement(
    string name,
    BindingFlags bindingFlags,
    Object value,
    params int[] indices
)
public:
void SetStaticArrayElement(
    String^ name, 
    BindingFlags bindingFlags, 
    Object^ value, 
    ... array<int>^ indices
)
member SetStaticArrayElement : 
        name:string * 
        bindingFlags:BindingFlags * 
        value:Object * 
        indices:int[] -> unit
public function SetStaticArrayElement(
    name : String, 
    bindingFlags : BindingFlags, 
    value : Object, 
    ... indices : int[]
)

Parameters

  • name
    Type: String

    The name of the array

  • bindingFlags
    Type: BindingFlags
  • value
    Type: Object

    The value to set the element identified by indices.

  • indices
    Type: array<Int32[]

    An array of subscripts for identifying the element to set.

.NET Framework Security

See Also

Reference

PrivateType Class

SetStaticArrayElement Overload

Microsoft.VisualStudio.TestTools.UnitTesting Namespace