Is managed DLL binary compatible?

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,

Below image show my code
  • 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!!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s