Using nameof to get name of tuple field. #3570
Unanswered
MichaelStett
asked this question in
General
Replies: 3 comments
-
This feels like a language design request. Those would go to dotnet/csharplang |
Beta Was this translation helpful? Give feedback.
0 replies
-
Only if it was intentional that this doesn't work. Is it? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Nameof is only specified to accept a (possibly qualified) name, not an arbitrary expression. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When trying to get
nameof
of tuple field directly through element from List i encountered such problem:Error CS8082 Sub-expression cannot be used in an argument to nameof.
I am currently using dotnet in verision 5.0.100-preview.4.20258.7
Beta Was this translation helpful? Give feedback.
All reactions