PostSharp6.2/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: 6.2.8.0 (6.2.8.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