Tag Archives: operator overloading

Operator overloading in C#

C# allows you to overload certain operators. The figure below shows a table of overloadable operators. neomercazole. 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. [...]

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