CallerMemberName not working with lambda default values? #7267
Unanswered
marius-bughiu
asked this question in
General
Replies: 1 comment
-
This is by design. The delegates created are System.Func and Action, nether of which have that attribute on them. Use a custom delegate type with that attribute of if you want this behavior. Thanks! |
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.
-
Was playing with the default values feature for lambdas, and noticed
CallerMemberName
is not working. Is it a bug, or a preview limitation?Can be tested easily with this:
The call to
myMethod1
doesn't output anything.The call to
myMethod2
correctly outputs<Main>$
.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions