Load the Data table content to the Dictionary
<pre><code>public static Dictionary&lt;string, object&gt; LonView()
        {
            string sql = "SELECT Marks,Id FROM table4";
            using (SqlConnection Connection = new SqlConnection((@"DataSource")))
            {
                using (SqlCommand myCommand = new SqlCommand(sql, Connection))
                {
                    Connection.Open();
                    using (SqlDataReader myReader = myCommand.ExecuteReader())
                    {
                        DataTable dt = new DataTable();
                        dt.Load(myReader);
                        Connection.Close();
  Dictionary&lt;string, object&gt; lst = new Dictionary&lt;string, object&gt;();
                      var tableEnumerable = dt.AsEnumerable();
                        var tableArray = tableEnumerable.ToArray();
                foreach (var data in tableArray)
                        {
                      lst.Add(data["id"].ToString(),data["Marks"] as string);
                        }

return lst;
          }
      }
   }
}
</code></pre>

<p>I want to convert my Data table Column to  Dictionary and return the Dictionary in  Array{["A",30],["B",32],["C",45]} form.Suggest some ideas to do my Task.</p>