表題の通りですが、サンプル書いてみます。
※例外などは省いて極力シンプルなものにしています。
※3列のCSVで、1列目に数値、2,3列目が文字列を想定しています。
var filePath = @"xxxxx.csv";
var separator = new[] { ',' };
var data = new System.Collections.Generic.List<System.Tuple<int, string, string>>();
foreach (var line in System.IO.File.ReadLines(filePath)) {
var cols = line.Split(separator);
data.Add(new System.Tuple<int, string, string>(int.Parse(cols[0]), cols[1], cols[2]));
}
あとは、上記でいえばdata変数をLinqで自由に解析できるのも魅力ですね。
※どちらかといえば、そちらの方が楽しいw