Array to dictionary

Dec 27 2016 2:13 AM
I have  array contains {[Name][Age],[Marks]}.I want to add the marks into dictionary .How can I?
  1. var tableEnumerable = dt.AsEnumerable();  
  2.  var tableArray = tableEnumerable.ToArray();  
  3.                         foreach (var data in tableArray)  
  4.                         {  
  5.                           lst.Add(data["Name"].ToString(),data["Age"] as string);  
  6.                             
  7.                         }  

Answers (3)