title: Compilation Error: "The modifier 'public' is not valid for this item" while explicitly implementing the interface
body: <p>I am getting this error while creating a <code>public</code> method on a class for explicitly implementing the <code>interface</code>. I have a workaround: by removing the explicit implementation of <code>PrintName</code> method. But I am surprised why I am getting this error.</p>
  
  <p>Can anyone explain the error?</p>
  
  <p>Code for Library:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  
  namespace Test.Lib1
  {
  
      public class Customer : i1 
      {
          public string i1.PrintName() //Error Here...
          {
              return this.GetType().Name + " called from interface i1";
          }
      }
  
      public interface i1
      {
          string PrintName();
      }
  
      interface i2
      {
          string PrintName();
      }
  }
  </code></pre>
  
  <p>Code for Console Test Application:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using Test.Lib1;
  
  namespace ca1.Test
  {
      class Program
      {
          static void Main(string[] args)
          {
              Customer customer = new Customer();
              Console.WriteLine(customer.PrintName());
  
              //i1 i1o = new Customer();
              //Console.WriteLine(i1o.printname());
  
              //i2 i2o = new Customer();
              //Console.WriteLine(i2o.printname());
  
          }
      }
  }
  </code></pre>