diff --git a/src/Compilers/Core/Portable/Syntax/SyntaxNode.cs b/src/Compilers/Core/Portable/Syntax/SyntaxNode.cs index 2fa3cacde42ce..9dfd156518751 100644 --- a/src/Compilers/Core/Portable/Syntax/SyntaxNode.cs +++ b/src/Compilers/Core/Portable/Syntax/SyntaxNode.cs @@ -795,7 +795,7 @@ public IEnumerable ChildNodes() } /// - /// Gets a list of ancestor nodes + /// Gets a list of ancestor nodes in order from the innermost containing syntactic ancestor to the outermost. /// public IEnumerable Ancestors(bool ascendOutOfTrivia = true) { @@ -806,7 +806,7 @@ public IEnumerable Ancestors(bool ascendOutOfTrivia = true) } /// - /// Gets a list of ancestor nodes (including this node) + /// Gets a list of ancestor nodes (including this node) in order from this node to the outermost ancestor. /// public IEnumerable AncestorsAndSelf(bool ascendOutOfTrivia = true) { @@ -832,7 +832,8 @@ public IEnumerable AncestorsAndSelf(bool ascendOutOfTrivia = true) } /// - /// Gets the first node of type TNode that matches the predicate. + /// Gets the first node of type TNode that matches the predicate. Ancestors are searched in order from + /// this node to the outermost ancestor. /// public TNode? FirstAncestorOrSelf(Func? predicate = null, bool ascendOutOfTrivia = true) where TNode : SyntaxNode @@ -850,7 +851,8 @@ public IEnumerable AncestorsAndSelf(bool ascendOutOfTrivia = true) } /// - /// Gets the first node of type TNode that matches the predicate. + /// Gets the first node of type TNode that matches the predicate. Ancestors are searched in order from + /// this node to the outermost ancestor. /// [SuppressMessage("ApiDesign", "RS0026:Do not add multiple public overloads with optional parameters", Justification = "Required for consistent API usage patterns.")] public TNode? FirstAncestorOrSelf(Func predicate, TArg argument, bool ascendOutOfTrivia = true)