Open sandboxFocus

Property IsIteratorMethod

IsIteratorMethod

Gets a value indicating whether the method is an iterator, i.e., whether it has a yield return or yield break statement.

Declaration
public bool? IsIteratorMethod { get; }
Property Value
Type Description
bool?

true if the method uses yield return or yield break; false if the method returns an enumerable type but does not use yield; null if the method is not defined in the current project and the information is not available.

Remarks

This property only indicates whether the method uses yield-based iteration. To determine the kind of enumerable returned by the method regardless of implementation, use EnumerableKind.