PostSharp4.3//API Reference/Post­Sharp.​Aspects Namespace/Method­Execution­Args Class/Method­Execution­Args Properties/Method­Execution­Args.​Return­Value Property
MethodExecutionArgs.ReturnValue Property
Gets or sets the method return value.

Namespace: PostSharp.Aspects
Assembly: PostSharp (in PostSharp.dll) Version: 4.3.48.0 (4.3.48.0)
Syntax
C#
public Object ReturnValue { get; set; }

Property Value

Type: Object
Remarks

You can modify the return value only when the join point is located after a method execution (OnSuccess(MethodExecutionArgs), OnException(MethodExecutionArgs) or OnExit(MethodExecutionArgs), or in case you force the method to exit using the FlowBehavior property.

Note Note
As a result of weaving optimizations, value of this property may be seen null in a debugger. If you need to inspect the value in runtime, consider disabling aspect optimizations in the debug build configuration.
See Also