Sandeep Kumar
Why we use Interface ?
By Sandeep Kumar in ASP.NET on Jan 09 2016
  • Arun Saini
    Apr, 2016 12

    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.

    • 3
  • Rafnas T P
    Jan, 2016 11

    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

    • 3
  • Kashif Asif
    Aug, 2016 7

    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.

    • 1
  • Munesh Sharma
    May, 2016 31

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

    • 1
  • Vincent Maverick Durano
    Apr, 2016 12

    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. :)

    • 1
  • Hammad Hassan
    Jan, 2016 18

    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.

    • 1
  • Ayyaz Ahmad
    Jan, 2016 17

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

    • 1
  • rahul shinde
    Feb, 2024 27

    interface is agrrement between itself and implmenetd clas in C# Multiple inheritance is not supoorted so we use interfaces

    • 0
  • Jefferson S. Motta
    Jul, 2018 25

    I use for speed purpouses, the JIT Compiler compile just one time if you are using several classes with the same interface.

    • 0
  • Mukesh Kumar
    Sep, 2017 3

    for multiple inheritence

    • 0
  • Manoj Kumar Duraisamy
    Jan, 2017 3

    To achieve multiple inheritance we using interface in c#

    • 0
  • Khaja Moizuddin
    Dec, 2016 2

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

    • 0
  • Manav Pandya
    Sep, 2016 20

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

    • 0
  • Bikesh Srivastava
    Sep, 2016 20

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

    • 0
  • Hiren Parmar
    Aug, 2016 14

    because using interface we can multiple inheritence

    • 0
  • Francis
    Aug, 2016 6

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

    • 0
  • Keerthi Venkatesan
    May, 2016 13

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

    • 0
  • Munesh Sharma
    May, 2016 9

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

    • 0
  • Keerthi Venkatesan
    Apr, 2016 11

    to support multiple inheritance

    • 0
  • Maruthi Palllamalli
    Mar, 2016 9

    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.

    • 0
  • Pankaj  Kumar Choudhary
    Feb, 2016 21

    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"

    • 0
  • Akhil Garg
    Jan, 2016 31

    to support multiple inheritance and to make loosely coupled software.

    • 0
  • Anil Kumar Murmu
    Jan, 2016 12

    Hide implementation, supports multiple inheritance

    • 0
  • Sandeep Kumar
    Jan, 2016 9

    We use interface for uncoupling the layer.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS