Open
Description
Type of issue
Typo
Description
On this page: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/operator-overloading
The sentence:
"The increment (++) and decrement (--) operators can be implemented as either static or instance methods."
Is incorrect for C#. In C#, operator overloads (including ++ and --) must always be declared static, as enforced by the compiler.
I believe this sentence may have been copied from C++ documentation by mistake.
Please review and correct if needed.
Page URL
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/operator-overloading
Content source URL
Document Version Independent Id
5ec5c397-c7c6-700c-bc36-a8dfb2396dad
Platform Id
e83aae5a-e070-c00c-3914-cadfa33a9fe9
Article author
Metadata
- ID: f91d85ae-8b37-e837-a031-144571362fbb
- PlatformId: e83aae5a-e070-c00c-3914-cadfa33a9fe9
- Service: dotnet-csharp
- Sub-service: lang-reference