Tag: reflection数据表

List 中的数据表

我已经下载了List Rows包含的数据,如下所示: class Row { string[] Items { get; set; } public Row(string[] Items) { this.Items = Items; } } 行基本上以逗号分隔的条目(.csv) using (var reader = new StreamReader(spreadSheetStream)) { string header = reader.ReadLine(); //This is the header Rows.Add(new Row(header.Split(‘,’))); while (!reader.EndOfStream) { string tickerInfo = reader.ReadLine(); //This is a data entry Rows.Add(new Row(tickerInfo.Split(‘,’))); } } 我将List转换为像这样的Datatable […]