Add(Int32, T?) Method

Definition

Namespace Stunts
Assembly Stunts.dll

Sets the value of the parameter with the given index.

[EditorBrowsable(EditorBrowsableState.Never)]
public void Add<T>(int index, T? value)

Type parameters

T
Type of the value being set.

Parameters

index
Int32

Index of the argument being set.

value
{T}

Value of the argument.

Remarks

This method is equivalent to SetValue(Int32, Object?) and supports object initialization syntax so you can write code like:

var args = new ArgumentCollection(parameters) 
{
  { 0, "hello" },
  { 1, 25 },
  { 2, true },
};