我正在读取 C# 中的文本文件并尝试将其保存到 SQL 数据库。我很好,只是我不希望第一行,即列的名称,包含在导入中。排除这些最简单的方法是什么?
代码是这样的
while (textIn.Peek() != -1)
{
string row = textIn.ReadLine();
string[] columns = row.Split(' ');
Product product = new Product();
product.Column1 = columns[0];
etc.....
product.Save();
}
谢谢