title: how to fix 'T' is a 'type parameter' but is used like a 'variable' compile error
body: <p>I need to check if a generic type parameter <code>T</code> is <code>MyEntity</code> or a subclass of it.</p>
  
  <p>Code below causes this compiler error:</p>
  
  <pre><code>'T' is a 'type parameter' but is used like a 'variable'
  </code></pre>
  
  <p>how to fix?</p>
  
  <pre><code>public class MyEntity { }
  
  static void Test&lt;T&gt;()
  {
      // Error    34  'T' is a 'type parameter' but is used like a 'variable'
      if (T is MyEntity)
      {
      }
  }
  </code></pre>