Support us .Net Basics C# SQL ASP.NET ADO.NET MVC Slides C# Programs Subscribe Buy DVD

Part 31 - C# Tutorial - Explicit interface implementation


Part 31 - C# Tutorial - Explicit interface implementation


3 comments:

  1. thank you so much Venkat your a live saver

    ReplyDelete
  2. Hi Venkat,
    thanks a lot, your tutorial is very clear, as always. I was missing a couple of irrelevant things when you explained explicit and default implementation of methods. The first one is that in your example, if you use explicit implementation of InterfaceMethod() for both interfaces, I1 and I2, without removing the default implementation, you will be able to call 3 different implementations of InterfaceMethod(), with or without casting.
    The second one is this: if you don't explicitly implement InterfaceMethod() for interface I1 in the class Program P, then, if you invoke InterfaceMethod() like this: ((I1).P).InterfaceMethod(), the default (public) implementation of InterfaceMethod() will be executed.
    These are details, I know, and they are intended only as a little adjunct to your excellent explanation!
    Thank you!

    ReplyDelete
  3. @v.hradil exactly what would you like to ask here...

    ReplyDelete

If you like this website, please share with your friends on facebook and Google+ and recommend us on google using the g+1 button on the top right hand corner.