i am little confusing to understanding the real-life examples of interface and abstract class in c#
- interface
- abstract class
Yes, it may be confusing for some people :)
An abstract class with no implementation looks like an interface. Hovewer there are some differences.
An abstract class cannot be instantiated. It is used to be a base class for any inherited classes. It's kind of contract for other classes that inherits from it which force all subclasses to carry on same standards.
An interface isn't a class at all. It has no implementation. I think main difference is that class can implement more than one interface, but only one class.