Skip to content

How-to determine if an "nameof" IdentifierToken is a contextual keyword #51788

Answered by CyrusNajmabadi
bernd5 asked this question in Q&A
Discussion options

You must be logged in to vote

The right way to do you is to actually check if the name is 'nameof'. It's not a special keyword.

In terms of roslyn quoter, it needs to call 'ParseToken' to get the right token here unfortunately.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@CyrusNajmabadi
Comment options

@bernd5
Comment options

@CyrusNajmabadi
Comment options

@bernd5
Comment options

@CyrusNajmabadi
Comment options

Answer selected by bernd5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants