PostSharp.ILAPI ReferencePost­Sharp.​Aspects.​InternalsArguments<TArg0, TArg1, TArg2, TArg3, TArg4, TArg5>Set­Argument
Open sandboxFocus

Arguments<TArg0, TArg1, TArg2, TArg3, TArg4, TArg5>.SetArgument Method

SetArgument(Int32, Object)

Sets the value of the ref or out argument at a given index. Replacing an argument value is supported only in some advices and is silently ignored in non-supported scenarios. See Remarks for details.

Declaration
public override void SetArgument(int index, object value)
Parameters
Type Name Description
System.Int32 index

Argument index.

Object value

New value of the ref or out argument at position index.

Overrides
Arguments.SetArgument(Int32, Object)
Exceptions
Type Condition
System.InvalidCastException

value is not assignable to parameter at position index.

System.ArgumentOutOfRangeException

index is lower than zero or greater or equal than Count.