Dictionary<string, string> MyDictionary = ds.Tables[0].AsEnumerable().ToDictionary(dr => dr["KeyName"].ToString(), dr => dr["KeyValue"].ToString());