Hey guys, Have a good time. I was digging a little deeper than shallow on Operator overloading in C# this day, and rather found some of interesting things under the hood. Coup d'oeil.
This program has a Coordinate class, where i try to overload the binary operator + to add the members x1,y1,x2,y2. At this point considering that the member function op_Addition() is not in place, things are axiomatically working fine. After adding op_Addition(), things become messed up, as my code is not compiling.(The intention behind adding the function is to check the IL difference between a normal function and the operator function whose operation is the same.) and i get the following error.
Omigosh !!!. I was dumbfounded. Something is astray behind the scenes, So i had a look into the IL (commenting the new comer op_Addition() to build successfully), and the operator function is translated something like this
BED TIME !!!! i will continue the story…..