title: Fill 2D ArrayList from MySql C#
body: <p>I am trying to retrieve data from MySql Database table</p>
  
  <pre><code>Date,     Price    
  5/5/1998  93.5$    
  10/5/1998 97.6$
  </code></pre>
  
  <p>and store them in an ArrayList or List in order to make some statistical calculations.</p>
  
  <pre><code>    string constring = "datasource=localhost;port=3306;username=root;password=;";
  MySqlConnection conDataBase = new MySqlConnection(constring);
  
  MySqlCommand cmdDataBase = new MySqlCommand("Select Date,AnnualPrice from db_og.historicprices;", conDataBase);
  
  MySqlDataAdapter mySqlDA = new MySqlDataAdapter(cmdDataBase);
  
  DataTable dt = new DataTable();
  
  mySqlDA.Fill(dt);
  
  List&lt;string&gt; data = new List&lt;string&gt;();
  
             if (dt.Rows.Count &gt; 0)
  
             {
                 foreach (DataRow drow in dt.Rows)
  
                     data.Add(drow["Date"].ToString());
  
              }
  </code></pre>