Skip to content

Commit 89db11c

Browse files
add clarification for increment/decrement operator overloading (#47710)
* add clarification for operator overloading * fix grammar * Update docs/csharp/language-reference/operators/operator-overloading.md --------- Co-authored-by: Bill Wagner <[email protected]>
1 parent 405d559 commit 89db11c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/csharp/language-reference/operators/operator-overloading.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Use the `operator` keyword to declare an operator. An operator declaration must
1818
- It includes a `public` modifier.
1919
- A unary operator has one input parameter. A binary operator has two input parameters. In each case, at least one parameter must have type `T` or `T?` where `T` is the type that contains the operator declaration.
2020
- It includes the `static` modifier, except for the compound assignment operators, such as `+=`.
21-
- The increment (`++`) and decrement (`--`) operators can be implemented as either static or instance methods.
21+
- The increment (`++`) and decrement (`--`) operators can be implemented as either static or instance methods. Instance method operators are a new feature introduced in C# 14.
2222

2323
The following example defines a simplified structure to represent a rational number. The structure overloads some of the [arithmetic operators](arithmetic-operators.md):
2424

0 commit comments

Comments
 (0)