title: How to call an indexer on a C# class from PowerShell?
body: <p>I'm having trouble figuring out how to get Powershell to call an indexer on my class. The class looks something like this (vastly simplified):</p>
  
  <pre><code>public interface IIntCounters
  {
      int this[string counterName] { get; set; }
  }
  
  public class MyClass : IIntCounters
  {
      public IIntCounters Counters { get { return this; } }
  
      int IIntCounters.this[string counterName]
          { get { ...return something... } }
  }
  </code></pre>
  
  <p>If I new up this class I can't just use the bracket operator on it - I get an "unable to index" error. I also tried using get_item(), which is what Reflector shows me the indexer ultimately becomes in the assembly, but that gets me a "doesn't contain a method named get_item" error.</p>
  
  <p><strong>UPDATE:</strong> this appears specific to my use of explicit interfaces. So my new question is: is there a way to get Powershell to see the indexer without switching away from explicit interfaces? (I really don't want to modify this assembly if possible.)</p>