What is benefit of using Operator overloading in C, C++, c#?
Printable View
What is benefit of using Operator overloading in C, C++, c#?
Operator Overloading is for using the single operator for multiple operations.
c# is the language based on oops methodology & this methodology is designed to save the resource used, time and minimise the errors. Operator overloading is one of the method fulfiling this purpose of oops.
[QUOTE=sivasubbu;29905]What is benefit of using Operator overloading in C, C++, c#?[/QUOTE]
Operator overloading means one operator behaves different types
that means + is used for addition at the same time '+' this is also used for string
concatination........
The main benefit of an operator overloading is[B][U] extensiblity[/U][/B]. An operator will act differently according to the given operands.
it is maily to reuse same objects.