title: Check if a type implements a generic interface without considering the generic type arguments
body: <p>I have an interface</p>
  
  <pre><code>public interface MyInterface&lt;TKey, TValue&gt;
  {
  }
  </code></pre>
  
  <p>Implementations are irrelevant. Now I want to check if a given type is an implementation of that interface. This method fails for</p>
  
  <pre><code>public class MyClass : MyInterface&lt;int, string&gt;
  {
  }
  </code></pre>
  
  <p>But I don't know how to do the check.</p>
  
  <pre><code>public void CheckIfTypeImplementsInterface(Type type)
  {
      var result1 = typeof(MyInterface&lt;,&gt;).IsAssignableFrom(type); --&gt; false
      var result2 = typeof(MyInterface&lt;int,string&gt;).IsAssignableFrom(type); --&gt; true
  }
  </code></pre>
  
  <p>What do I have to do for result1 to be true?</p>