title: internal member in an interface
body: <p>I have a list of objects implementing an interface, and a list of that interface:</p>
  
  <pre><code>public interface IAM
  {
      int ID { get; set; }
      void Save();
  }
  
  public class concreteIAM : IAM
  {
       public int ID { get; set; }
       internal void Save(){
       //save the object
       }
  
      //other staff for this particular class
  }
  
  public class MyList : List&lt;IAM&gt;
  {
      public void Save()
      {
          foreach (IAM iam in this)
          {
              iam.Save();
          }
      }
  
      //other staff for this particular class
  }
  </code></pre>
  
  <p>The previous code doesn't compile because the compiler requires all the interface members to be public.</p>
  
  <pre><code>internal void Save(){
  </code></pre>
  
  <p>But i don't want to allow the from outside my DLL to save the <code>ConcreteIAM</code>, it only should be saved through the <code>MyList</code>.</p>
  
  <p>Any way to do this?</p>
  
  <p><strong>Update#1</strong>: Hi all, thanks for the answers so far, but none of them is exactly what i need:</p>
  
  <p>The interface needs to be public because it is the signature the client from outside the dll will use, along with <code>ID</code> and other properties i didn't bother to write in the example to keep it simple.</p>
  
  <p>Andrew, I don't think the solution is create a factory to create another object that will contain the <code>IAM</code> members + Save. I am still thinking... Any other ideas?</p>