Click or drag to resize

SyntaxNodeIsEquivalentTo Method (SyntaxNode, Boolean)



Determines if two nodes are the same, disregarding trivia differences.

Namespace:  Microsoft.CodeAnalysis
Assembly:  Microsoft.CodeAnalysis (in Microsoft.CodeAnalysis.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public bool IsEquivalentTo(
	SyntaxNode node,
	bool topLevel = false
)

Parameters

node
Type: Microsoft.CodeAnalysisSyntaxNode
The node to compare against.
topLevel (Optional)
Type: SystemBoolean
If true then the nodes are equivalent if the contained nodes and tokens declaring metadata visible symbolic information are equivalent, ignoring any differences of nodes inside method bodies or initializer expressions, otherwise all nodes and tokens must be equivalent.

Return Value

Type: Boolean
See Also