Skip to main content

SyntaxExtensions.ContainsYield Method

Containing Type: SyntaxExtensions

Assembly: Roslynator.CSharp.dll

Overloads​

MethodSummary
ContainsYield(LocalFunctionStatementSyntax)Returns true if the specified local function contains yield statement. Nested local functions are excluded.
ContainsYield(MethodDeclarationSyntax)Returns true if the specified method contains yield statement. Nested local functions are excluded.

ContainsYield(LocalFunctionStatementSyntax)​

Returns true if the specified local function contains yield statement. Nested local functions are excluded.

public static bool ContainsYield(this Microsoft.CodeAnalysis.CSharp.Syntax.LocalFunctionStatementSyntax localFunctionStatement)

Parameters​

localFunctionStatement   LocalFunctionStatementSyntax

Returns​

Boolean

ContainsYield(MethodDeclarationSyntax)​

Returns true if the specified method contains yield statement. Nested local functions are excluded.

public static bool ContainsYield(this Microsoft.CodeAnalysis.CSharp.Syntax.MethodDeclarationSyntax methodDeclaration)

Parameters​

methodDeclaration   MethodDeclarationSyntax

Returns​

Boolean