locked
what is Extensibility for interface RRS feed

All replies

  • User-1780421697 posted

    In C# multiple class level inheritance in not allowed so thats why we use multiple interfaces to achieve Extensibility, class or interface can be used to achieve this, there are some limitation and diff when you use class and interface for inheritance. like all member of interface should be public etc.

    https://stackoverflow.com/questions/2271104/class-vs-interface

    Tuesday, January 21, 2020 8:55 AM
  • User-17257777 posted

    Hi siddangoud,

    An Interface is a reference type and it included only abstract members such as Events, Methods, Properties etc. and it has no implementations for any of its members.When a Class implements an Interface are forced by the compiler to write the methods and Properties that the Interface has defined.

    http://net-informations.com/faq/general/class-interface.htm

    Best Regards,

    Jiadong Meng

    Wednesday, January 22, 2020 6:38 AM
  • User1949625403 posted

    An interface in c# is more like a contract and the class or struct that implements an interface must provide an implementation for all the members that are specified in the interface definition.

    Check following interface topic to learn more about it

    https://www.tutlane.com/tutorial/csharp/csharp-interface

    Thursday, January 23, 2020 9:35 AM