You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support other assignment operators as part of the object initializer.
Motivation
We can use object initializes to reduce some repetitions in the code when it comes to assignment of fields or properties but currently doing something like combining flags isn't supported.
Detailed design
Today if we want to combine flags we have to do that outside to the object initializer like so:
Summary
Support other assignment operators as part of the object initializer.
Motivation
We can use object initializes to reduce some repetitions in the code when it comes to assignment of fields or properties but currently doing something like combining flags isn't supported.
Detailed design
Today if we want to combine flags we have to do that outside to the object initializer like so:
I'm proposing to support additional assignment operators so with this change we could do the following:
Drawbacks
Not aware of any.
Alternatives
Assign the property/field outside to the object initializer.
The text was updated successfully, but these errors were encountered: