29
Reply

Why we use Interface ?

Sandeep Kumar

Sandeep Kumar

Jan 09, 2016
4k
1

    Interface basically used for Design Pattern. Interface can have Property,method,Events and Indexer.We can not define function body. and Implement derived class.Interface support multiple Inheritance.interface can not inherit class but class can inherit interface.

    Arun Saini
    April 12, 2016
    3

    Interface is for ->create loosely coupled software ->support design by contract (an implementor must provide the entire interface) ->allow for pluggable software ->allow different objects to interact easily ->hide implementation details of classes from each other ->facilitate reuse of software

    Rafnas T P
    January 11, 2016
    3

    Basically Interface flexibility of the code. it is used like a Design Pattern. And you can implement Method, Properties, etc. in it. you can used it for multiple Inheritance to increase reusability but can't create object of that Interface.

    Kashif Asif
    August 07, 2016
    1

    One reason I use interfaces is because it increases the flexibility of the code

    Munesh Sharma
    May 31, 2016
    1

    to make complex scenarios easier and code maintainability much easier. If you are a fan of SOLID principles then you will exactly know why interface rocks. :)

    The major reason of using an Interface is that when we want to enforce some standards. In programming words, the class which will implements the interface must provide implementation of all functions/methods of an Interface. So, standard is imposed.

    Hammad Hassan
    January 18, 2016
    1

    it restrict/enforce us to specific design that these are the specific properties that object will contain

    Ayyaz Ahmad
    January 17, 2016
    1

    for multiple inheritence

    Mukesh Kumar
    September 03, 2017
    0

    for multiple inheritence

    Mukesh Kumar
    September 03, 2017
    0

    for multiple inheritence

    Mukesh Kumar
    September 03, 2017
    0

    for multiple inheritence

    Mukesh Kumar
    September 03, 2017
    0

    for multiple inheritence

    Mukesh Kumar
    September 03, 2017
    0

    for multiple inheritence

    Mukesh Kumar
    September 03, 2017
    0

    for multiple inheritence

    Mukesh Kumar
    September 03, 2017
    0

    for multiple inheritence

    Mukesh Kumar
    September 03, 2017
    0

    To achieve multiple inheritance we using interface in c#

    Manoj Kumar
    January 03, 2017
    0

    If we want to access the other class without the creation of object. It is a reusable component

    Khaja Moizuddin
    December 02, 2016
    0

    Simple answers is that ASP.NET is OOPS based ... So Multiple Inheritance no longer supported Thats why we should use "Interface"

    Manav Pandya
    September 20, 2016
    0

    Its work like as layer,same as a class. https://bikeshsrivastava.blogspot.in/2016/06/part-23what-is-interface-and-abstract.html

    Bikesh Srivastava
    September 20, 2016
    0

    because using interface we can multiple inheritence

    Hiren Parmar
    August 14, 2016
    0

    To achieve Loop coupling between module and achieve run time polymorphism.

    Francis
    August 06, 2016
    0

    Interfaces are more flexible than base classes because you can define a single implementation that can implement multiple interfaces.

    Keerthi Venkatesan
    May 13, 2016
    0

    http://dotnet-munesh.blogspot.in/2015/09/interface-in-c.html

    Munesh Sharma
    May 09, 2016
    0

    to support multiple inheritance

    Keerthi Venkatesan
    April 11, 2016
    0

    Interface is a component directive to implement all properties.A class that implements an interface must implement all of the methods described in the interface. So many things can support loosely coupled along with interface.

    Maruthi Palllamalli
    March 09, 2016
    0

    Hide implementation, supports multiple inheritance and provide a agreement for all class that it inherit the interface that is "all class provide implementation of all functions/methods of an Interface"

    Pankaj Kumar Choudhary
    February 21, 2016
    0

    to support multiple inheritance and to make loosely coupled software.

    Akhil Garg
    January 31, 2016
    0

    Hide implementation, supports multiple inheritance

    Anil Kumar Murmu
    January 12, 2016
    0

    We use interface for uncoupling the layer.

    Sandeep Kumar
    January 09, 2016
    0