title: Store Generic Array in Class using Delphi XE
body: <p>Using the structure below, how can I define my TAnimalCollection class in order to store my collection? Calling either SelectAll or SelectTop10 will update the SelectedRecords.
  Removing the private field allows the code to compile, but there is no mechanism to then store the returned result set.</p>
  
  <pre><code>  TDog = class
    private
      FBreed: string;
    public
      property Breed: string read FBreed write FBreed;
    end;
  
    TCat = class
    private
      IsWild: string;
    public
      property IsWild: string read FIsWild write FIsWild;
    end;
  
    TMyArray&lt;T&gt; = array of T;
  
    TAnimalCollection = class
    private
      SelectedRecords: TMyArray&lt;T&gt;; // Generates: Undeclared Identifier: 'T'
    public
      function SelectAll&lt;T&gt;: TMyArray&lt;T&gt;;
      function SelectTop10&lt;T&gt;: TMyArray&lt;T&gt;; 
      // Other Methods
    end;
  </code></pre>