title: How can I convert reflection method result to array?
body: <p>I'm using reflection with parameter. I'm getting results as <code>IQueryable</code>. I want to convert this <code>ToArray()</code>. I tried Array instead of <code>IQueryable</code> but not working like following code:</p>
  
  <pre><code>var countries = entity.Countries.ToArray(); 
  </code></pre>
  
  <p>How can i get same result with this code?</p>
  
  <pre><code>public IQueryable Get(string tableName)
  {
      var result = _db.GetType().GetProperty(tableName)?.GetValue(_db, null) as IQueryable;
      return result;
  }
  </code></pre>