Can any 1 tell me few scenarios 4 using Interface in C#
Hi all ,
I ve'nt use an Interface yet as I am really confuse abt its use.
I have read in articles that When trying to build maintainable,
reusable, and flexible C# code, the object oriented nature of C# only
gets us 50% of the way there. Programming to interfaces can provide us with the last 50%.
Now if we go for Interface defination then :-
An interface is a reference type object with no implementation.
No properties or methods are actually coded in an interface, they are only defined.
So the interface doesn't actually do anything but only has a signature for interaction
with other classes or interfaces.
Can any one plz explain me how interface is the replacement of multiple inheritance of c++.
If it has only signature of the methods then how it helps for multiple inheritence.How
it increase code reusability.
If possible plz give some codes and help me understand this little concepts. I have went
through many articles but could'nt figure out where to use so that it will
increase COde reusabilty.
Thanks & Regards
s_raj0205