title: Convert object[] "list" from SQL query into string[] "test"
body: <p>I wanna convert an object Array called "list" into a string Array called "test".
  Attached the code.
  The Problem is, the function is returning "System.Collections.Generic.Dic..." and not the strings in SQL database.
  Thanks..</p>
  
  <p>Code:</p>
  
  <pre><code>    public string[] ListMethod(string command)
      {
          MySqlCommand comm = new MySqlCommand(command, conn);
          MySqlDataReader commreader;
          commreader = comm.ExecuteReader();
  
          var list = new List&lt;IDictionary&lt;string, object&gt;&gt;();           
  
          while (commreader.Read())
          {
              var record = new Dictionary&lt;string, object&gt;();
  
              for (int i = 0; i &lt; commreader.FieldCount; i++)
              {
                  var key = commreader.GetName(i);
                  var value = commreader[i];
                  record.Add(key, value);
              }
  
              list.Add(record);
          }
          string[] test = ((IEnumerable)list).Cast&lt;object&gt;().Select(x =&gt; x.ToString()).ToArray();
          return test;
      }
  </code></pre>