title: How to select which member is exported to COM when using explicit interface implementation?
body: <p>If my class implements <code>IEnumerable</code>, I can use VBScript's <code>For Each</code> loop:</p>
  
  <pre><code>[ComVisible(true)]
  [ProgId("Stackoverflow.MyIssues")]
  [Guid("7D392CB1-9080-49D0-B9CE-05B214B2C448")]
  public class MyIssue : IEnumerable
  {
    readonly List&lt;string&gt; issues = new List&lt;string&gt;(new string[] { "foo", "bar" });
  
    public string this[int index]
    {
      get { return issues[index]; }
    }
  
    public IEnumerator GetEnumerator()
    {
      return issues.GetEnumerator();
    }
  }
  
  
  Dim o : Set o = CreateObject("Stackoverflow.MyIssues")
  
  Dim i
  For Each i In o
    WScript.Echo i
  Next
  </code></pre>
  
  <p>If I change the interface to <code>IEnumerable&lt;string&gt;</code> (so C#'s <code>foreach</code> loop uses <code>string</code> instead of <code>object</code>):</p>
  
  <pre><code>public class MyIssue : IEnumerable&lt;string&gt;
  </code></pre>
  
  <p>and replace <code>GetEnumerator</code> with:</p>
  
  <pre><code>public IEnumerator&lt;string&gt; GetEnumerator()
  {
    return issues.GetEnumerator();
  }
  
  IEnumerator IEnumerable.GetEnumerator()
  {
    return GetEnumerator();
  }
  </code></pre>
  
  <p>The scritp will fail with an error:</p>
  
  <blockquote>
    <p>Object Doesn't Support this Property or Method</p>
  </blockquote>
  
  <p>My understanding is that the public <code>GetEnumerator()</code> is not exported, since it
  is a generic method, and the <code>IEnumerable.GetEnumerator</code> is not exported, since
  my instance must first be casted to <code>IEnumerable</code> but in VBScript one cannot
  cast objects.</p>
  
  <p>Is this true?
  Is it possible to tell the compiler that <code>IEnumerable.GetEnumerator</code> should be
  exported as <code>public IEnumerable GetEnumerator</code>? (Or does this statement make no
  sense? etc.)</p>