PostSharpAPI ReferencePost­Sharp.​AspectsArgumentsSet­Argument
Open sandboxFocus

Arguments.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.

public virtual void SetArgument(int index, object value)
Type Name Description
Int32 index

Argument index.

Object value

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


Replacing a parameter value is supported in the following scenarios:

Setting the value in a different situation is unsupported and has unspecified behavior.

Type Condition

value is not assignable to parameter at position index.


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