title: Constraints are not allowed on non-generic declarations
body: <p>I've had a look at the other similar questions but the issues were syntax errors.  Perhaps I'm missing something but my syntax looks correct as far as I can tell.
  I'm trying to declare a method as follows:</p>
  
  <pre><code>internal IDictionary&lt;string, T&gt; FillObjects(
      IReadableRange&lt;T&gt; svc,
      Func&lt;T, string&gt; getKey) where T : BaseEntity
  {
  }
  </code></pre>
  
  <p>but am getting the compiler error:</p>
  
  <blockquote>
    <p>constraints are not allowed on non-generic declarations</p>
  </blockquote>
  
  <p>any ideas?</p>
  
  <p>thanks</p>
  
  <p>Matt</p>