ReturnValue
Gets or sets the method return value.
Declaration
public object ReturnValue { get; set; }Property Value
| Type | Description |
|---|---|
| object |
Remarks
<p>
You can modify the return value only when the join point is located
after a method execution (<xref href="PostSharp.Aspects.OnMethodBoundaryAspect.OnSuccess(PostSharp.Aspects.MethodExecutionArgs)" data-throw-if-not-resolved="false"></xref>,
<xref href="PostSharp.Aspects.OnMethodBoundaryAspect.OnException(PostSharp.Aspects.MethodExecutionArgs)" data-throw-if-not-resolved="false"></xref> or <xref href="PostSharp.Aspects.OnMethodBoundaryAspect.OnExit(PostSharp.Aspects.MethodExecutionArgs)" data-throw-if-not-resolved="false"></xref>,
or in case you force the method to exit using the <xref href="PostSharp.Aspects.MethodExecutionArgs.FlowBehavior" data-throw-if-not-resolved="false"></xref> property.
</p>
<div class="NOTE"><h5>note</h5><p>
As a result of weaving optimizations, value of this property may be seen as null in a debugger.
If you need to inspect the value in runtime, consider disabling aspect optimizations in the debug build configuration.