title: Inherit from C# interface to class in C++/CLI project
body: <p>My C++/CLI dll project refers to a C# dll. I'm able to use all the classes defined in the refered dll, but I'm unsure how to handle Interfaces.</p>
  
  <p>By reading other questions online, I believe I should be able to create a class which inherits from the interface.</p>
  
  <p>If the interface is called <code>IMeshData</code> and I define a class <code>MeshData</code>, isn't this correct?:</p>
  
  <pre><code>public ref class MeshData : IMeshData{
  
       //Here I should be able to implement my own functions which can access the interface function, or overload them.
  
  }
  </code></pre>
  
  <p>In Visual Studio, if I do the above, I will get an error on <code>MeshData</code> stating:</p>
  
  <blockquote>
    <p>Error: class fails to implement interface function "IMeshData::NodeById" (declared in (...).dll)</p>
  </blockquote>
  
  <p>The function <code>IMeshData::NodeById</code> is defined as:</p>
  
  <pre><code>INode IMeshData.NodeById(Int32 nodeId)
  </code></pre>
  
  <p>Where <code>INode</code> is a different interface.</p>
  
  <p>Does that error mean that this function <code>NodeById</code>, can for reason not be implemented, and therefor I'm cannot inherit any functions?</p>
  
  <p>How would I implement this function (which I do not need), so that this error will be resolved?</p>
  
  <p>I do not have access the source of the refered dll.</p>