title: Significance of Interfaces C#
body: <p>I would like to know the significant use of Interface. I have read many articles but not getting clearly the concept of interface.</p>
  
  <p>I have written a small program. I have defined the Interface <code>Itest.Class(Manager)</code> has implemented the <code>Interface.Another class(Employee)</code> has not implemented interface. But defined the same method(<code>DoSomething()</code>) in the interface in the class(<code>Employee</code>). I can call the method from the class object. Then why should i go and implement interface. I can directly implement the method in a class and call the method. Why should i go for extra step of implementing method in a Interface and then inheriting the interface by class. I know interface supports multiple inheritance, but I am not using multiple inheritance in this example.</p>
  
  <p>Thanks for any ideas or input.</p>
  
  <pre><code>public interface Itest
  {
      void DoSomething();
  }
  
  public class Manager:Itest
  {
      public void DoSomething()
      {
          Console.WriteLine("test....");
      }
  
  }
  class Employee
  {
      public void DoSomething()
      {
          Console.WriteLine("test....");
      }
  }
  
  class Program
  {
      static void Main(string[] args)
      {
          Manager m = new Manager();
          m.DoSomething();
          Employee e = new Employee();
          e.DoSomething();
          Console.ReadLine();
      }
  }
  </code></pre>