PostSharp6.0/API Reference/Post­Sharp.​Aspects Namespace/Arguments Class/Arguments Methods/Arguments.​Set­Argument Method

Arguments.SetArgument Method

Sets the value of the argument at a given index.

Namespace:  PostSharp.Aspects
Assembly:  PostSharp (in PostSharp.dll) Version: 6.0.35.0 (6.0.35.0)
Syntax
C#
public virtual void SetArgument(
	int index,
	Object value
)

Parameters

index
Type: System.Int32
Argument index.
value
Type: System.Object
New value of the argument at position index.
Exceptions
ExceptionCondition
InvalidCastExceptionvalue is not assignable to parameter at position index.
ArgumentOutOfRangeExceptionindex is lower than zero or greater or equal than Count.
See Also