Tag Archives: operator

Operator overloading in C#

C# allows you to overload certain operators. The figure below shows a table of overloadable operators. Suppose there is a BankAccount class which contains a Number property and a Balance property. The + (addition) operator can be overloaded to combine two BankAccount instances and to return a new BankAccount instance with the combined balances. This [...]

Posted in C# | Also tagged , , , , , , , , | Leave a comment