This is in continuation of the error discussed in my earlier blog .
While working with this error I accidently clicked on my main application without rebuilding and it worked although I had done changes to my referenced DLL.
Does it mean compiled DLL are binary compatible?
Lets see how it works,
- Referenced DLL (you can see I’ve commented the overloaded API )
- My test application code
Now I build my exe and read the generated IL code in C# using reflector
Below are the images:
- When overloaded API is commented
- When overloaded API is uncommented and my application is rebuilt.
These images reveal that compiler intelligently creates the syntax (in IL) according to the best available function.
Pretty interesting stuff!!