C#: Bind Dictionary<string, List<string>> to DataTable
问题 I have one dictionary Like Dictionary<string, List<string>> first=new Dictionary<string, List<string>>(); I want to bind this dictionary to data table such that data table ColumnName should be key of the dictionary and respective columns should contain their dictionary values. What I tried: Dictionary<string, List<string>> some= new Dictionary<string, List<string>>(); System.Data.DataTable dt = new System.Data.DataTable(); foreach (var entry in some) { if (entry.Value.Count > 0) { dt.Columns