Home >Backend Development >C#.Net Tutorial >What is the overloading capability of operators in C#

What is the overloading capability of operators in C#

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBforward
2023-09-15 08:13:081384browse

What is the overloading capability of operators in C#

The following is a list of operators that can be overloaded in C#, and the operators that cannot be overloaded.

Serial number Operator and description
1 , -, !, ~, , --

These unary operators accept one operand and can be overloaded.

2 , -, *, /, %

These binary operators Accepts two operands and can be overloaded.

3 ==, !=, , =

Comparison operators can be overloaded.

4 &&, ||

Conditional logical operators cannot be directly overloaded .

5 =, -=, *=, /=, %=

Assignment operators cannot be overloaded.

6 =, ., ?:, -

These operators cannot be overloaded.

The above is the detailed content of What is the overloading capability of operators in C#. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete