What is Operator Overloading in .NET?Operator overloading is the most evident example of Polymorphism. In operator overloading, an operator is ‘overloaded’ or made to perform additional functions in addition to what it actually does. For e.g. we can overload the “+” operator to add two complex numbers or two imaginary numbers.
X= a + b //+ is overloaded to add two integers, float etc Few operators like :: cannot be overloaded.
|