title: How can I implement static methods on an interface?
body: <p>I have a 3rd party C++ DLL that I call from C#.</p>
  
  <p>The methods are static.</p>
  
  <p>I want to abstract it out to do some unit testing so I created an interface with the static methods in it but now my program errors with:</p>
  
  <blockquote>
    <p>The modifier 'static' is not valid for this item</p>
  </blockquote>
  
  <pre><code>MyMethod cannot be accessed with an instance reference; qualify it with a type name instead
  </code></pre>
  
  <p>How can I achieve this abstraction?</p>
  
  <p>My code looks like this</p>
  
  <pre><code>private IInterfaceWithStaticMethods MyInterface;
  
  public MyClass(IInterfaceWithStaticMethods myInterface)
  {
    this.MyInterface = myInterface;
  }
  
  public void MyMethod()
  {
    MyInterface.StaticMethod();
  }
  </code></pre>