Closed
Description
Visual Studio release
other - specify below
Link to speclet
Link to Pull request
New behavior
Type authors can now define the behavior for compound assignment operators, such as +=
or *=
.
Prior to this, authors could override +
, and *
, bur not =
. The compound assignment operators have been defined to call the binary arithmetic operators and then the assignment operator.
This will allow authors to provide a "modify in place" implementation.
Language reference tasks
- This removes a restriction on these operators.
- It expands the list of overridable operators.
- Check all docs for where the (now invalid) restriction has been mentioned.
Everyday C# tasks
No response
Metadata
Metadata
Assignees
Type
Projects
Status
✅ Done