How to read text file by particular line separator character?

后端 未结 9 2002
独厮守ぢ
独厮守ぢ 2020-12-03 00:58

Reading a text file using streamreader.

using (StreamReader sr = new StreamReader(FileName, Encoding.Default))
{
     string line = sr.ReadLine();
}
<         


        
9条回答
  •  -上瘾入骨i
    2020-12-03 01:26

    Even though you said "Using StreamReader", since you also said "I my case, file can have tons of records...", I would recommend trying SSIS. It's perfect for what you're trying to do. You can process very large file and specify the line/column delimiters easily.

提交回复
热议问题