PostSharpAPI ReferencePost­Sharp.​AspectsFlow­BehaviorReturn
Open sandboxFocus

Field Return

Return immediately from the current method. Available only for OnEntry(MethodExecutionArgs) and OnException(MethodExecutionArgs). Note that you may want to set the ReturnValue property, otherwise you may get a NullReferenceException. If there is another OnMethodBoundaryAspect aspect before the current OnMethodBoundaryAspect aspect on the current method, the Return behavior calls the OnSuccess(MethodExecutionArgs) and OnExit(MethodExecutionArgs) methods of the other aspect.

Namespace: PostSharp.Aspects
Assembly: PostSharp.dll
public const FlowBehavior Return
Type Description