PostSharp 4.3 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Aspects Namespace / Method­Execution­Args Class / Method­Execution­Args Properties / Method­Execution­Args.​Yield­Value Property
MethodExecutionArgs.YieldValue Property
Gets or sets the value yielded by the iterator method.

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

Property Value

Type: Object
Remarks

This property is only available inside the OnYield(MethodExecutionArgs) advice when the current method is an iterator method.

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