title: Why we do create object instance from Interface instead of Class?
body: <p>I have seen an Interface instance being generated from a class many times. Why do we use interface this way? An interface instance is created only itself with the help of the derived class and we can access only these interface members through this instance. How does this give an advantage? I'm so confused.</p>
  
  <pre><code>interface IPrint
  {
      void Print();
  }
  
  class Sample : IPrint
  {
      public void Print()
      {
          Console.WriteLine("Print...");
      }
  
      public void Sample()
      {
          Console.WriteLine("Sample...");
      }
  }
  
  class Program
  {
      static void Main(string[] args)
      {
          IPrint print = new Sample();
          print.Print();
      }
  }
  </code></pre>