Skip to main content

SyntaxExtensions.IsDescendantOf(SyntaxNode, SyntaxKind, Boolean) Method

Containing Type: SyntaxExtensions

Assembly: Roslynator.CSharp.dll

Returns true if a node is a descendant of a node with the specified kind.

public static bool IsDescendantOf(this Microsoft.CodeAnalysis.SyntaxNode node, Microsoft.CodeAnalysis.CSharp.SyntaxKind kind, bool ascendOutOfTrivia = true)

Parameters​

node   SyntaxNode

kind   SyntaxKind

ascendOutOfTrivia   Boolean

Returns​

Boolean