I need to know if it is ok with you to use the interface examples in my article about interfaces on the medium platform. I really want to share these examples, as I have not come across such great examples anywhere online.
I am in the process of consuming as much as possible regarding interfaces. It could make things a little clearer if you prefix the interfaces with I (Iabc, Idef), since we will be taught that soon. It also makes it easier to see I am creating reference to the interface and not the implementation. Also I was confused because you are in Demo class and creating object of Demo. In most of my apps it seems like I would be around the entry point (say Form1 class), and then create the Demo object?
I am new to C#. I had a hard time to understand interfaces. But U explained very well. I understood it very well. But I am sure we can not use the same ref (refabc) for two(demo and sample.. And u missed Hello interface statement in output. Thank you so much. You made me understand this concept.
Really nice article but when I tried the p6,it is not working please check.I think you forget to create object for Demo Class.
We cant call xyz() method directly ,We need to create object of Class Demo for calling it.
Demo obj=new Demo();