[C# 14-Fundamentals and reference]: New Feature - User defined compound assignment operators #46100
Labels
🏁 Release: .NET 10
Work items for the .NET 10 release
dotnet-csharp/svc
📌 seQUESTered
Identifies that an issue has been imported into Quest.
whats-new/subsvc
Uh oh!
There was an error while loading. Please reload this page.
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
Everyday C# tasks
No response
Associated WorkItem - 431829
The text was updated successfully, but these errors were encountered: