Click or drag to resize

SyntaxNodeExtensionsGetCurrentNodeTNode Method

Gets the node within the subtree corresponding to the original tracked node. Use TrackNodes to start tracking nodes.

Namespace:  Microsoft.CodeAnalysis
Assembly:  Microsoft.CodeAnalysis (in Microsoft.CodeAnalysis.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
public static TNode GetCurrentNode<TNode>(
	this SyntaxNode root,
	TNode node
where TNode : SyntaxNode


Type: Microsoft.CodeAnalysisSyntaxNode
The root of the subtree containing the current node corresponding to the original tracked node.
Type: TNode
The node instance originally tracked.

Type Parameters


Return Value

Type: TNode

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type SyntaxNode. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also