Created
August 8, 2020 15:35
-
-
Save FLGMwt/52c3d9bcbde4b5ca358aec1fdfcc3f21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// tired | |
if (node.Expression is IdentifierNameSyntax) | |
{ | |
// node.Expression.Identifier.Dump(); <- `Does not contain a definition for "Identifier"` | |
var id = (IdentifierNameSyntax)node.Expression; | |
id.Identifier.Dump(); | |
} | |
// wired | |
if (node.Expression is IdentifierNameSyntax id) | |
{ | |
id.Identifier.Dump(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment