title: How to get all values from database for a particular column
body: <p>I have a company table and i used query <code>select * from company</code> .But now i only require all the company name from this table , how toget and store in to a string array.Following code snippet only one i raw of company name i get. but how to get all company names and store in to an array</p>
  
  <pre><code>reader = cmd.ExecuteReader();
  
              // write each record
              while(reader.Read())
              {
                  Console.WriteLine("{0}", 
                      reader["CompanyName"]; 
  
              }
  </code></pre>