Feature request: Extend expression body to event #1903
Unanswered
Orace
asked this question in
Language Ideas
Replies: 2 comments
-
Much forward something more generic to delegate simply a property getter and/or setter to another property is missing. Actually only the readonly property case is simplifiable with:
Something like:
Is really missing. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
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.
-
Consider this .Net 3.5 code:
The
get/set
andadd/remove
code are just boilerplates code.C# 6.0 has introduced expression-bodied members:
In this case not really a big improvement.
The subject of this proposition is to reduce the code used for the event to this:
Beta Was this translation helpful? Give feedback.
All reactions