什么是按列和查询列读取变量的更优化方法。这是我目前正在做的事情。
var lines = File.ReadAllLines("readme.csv").Select(a => a.Split(','));
//load columns into variables
var col1 = from line in lines select line[1];
var col2 = from line in lines select line[2];
var col3 = from line in lines select line[3];
var col4 = from line in lines select line[4];
//query column 1
foreach (string line in col1)
{ //query if ...
}
//query column 2
foreach (string line in col2)
{ //query if ...
}
//query column 3
foreach (string line in col3)
{ //query if...
}