title: Can I declare a dictionary with dynamic array as value type?
body: <p>I would like to have a function that takes a dictionary of string, array of variant. So it can be called with:</p>
  
  <pre><code>  searchDictionary := TDictionary&lt;string, array of variant&gt;;
    searchDictionary.Add('KEY_NAME', ['X01%', '%D01']);
    aValue := TDtoClass.Search(searchDictionary)
  </code></pre>
  
  <p>I am currently achieving this by</p>
  
  <pre><code>  searchDictionary := TDictionary&lt;string, TList&lt;variant&gt;&gt;.Create;
    searchDictionary.Add('BIN_NAME', TSearch.Values(['X01%', '%D01']));
  </code></pre>
  
  <p>where Tsearch is a class that exposes:</p>
  
  <pre><code>class function TSearch.Values(const arguments: array of variant): TList&lt;variant&gt;;
  var
  list : TList&lt;variant&gt;;
  item: variant;
  begin
      list := TList&lt;variant&gt;.Create;
      for item in arguments do
      begin
        list.Add(item);
      end;
      Result := list;           
  end;
  </code></pre>
  
  <p>What I would like to do is:</p>
  
  <pre><code>searchDictionary.Add('BIN_NAME', ['X01%', '%D01']);
  </code></pre>
  
  <p>instead of:</p>
  
  <pre><code>searchDictionary.Add('BIN_NAME', TSearch.Values(['X01%', '%D01']));
  </code></pre>
  
  <p>Any help will be greatly appreciated.</p>