title: Property using Generics in Delphi
body: <p>I'm trying to write a property which uses generics:</p>
  
  <pre><code>type TMyClass = class
    protected
      function GetCountBy&lt;T: Class&gt;: Integer;
    public
      property CountBy&lt;T: Class&gt;: Integer read GetCountBy&lt;T&gt;;
    end;
  </code></pre>
  
  <p>but the compile fails on the property declaration with the message 'Property CountBy does not exist in base class', and the red squiggle on the opening &lt; of the property name.</p>
  
  <p>Is there any way to achieve this?</p>
  
  <p>Edit:
  Here's my other use case, which is more complex but more real world:</p>
  
  <pre><code>property ItemsBy&lt;T: Class&gt;[Index: Integer]: T read GetItemsBy&lt;T&gt; write SetItemsBy&lt;T&gt;;
  </code></pre>
  
  <p>The function filters the contents of a list to return the Index'th item of the specified class.</p>