string strReadLine = srReadFile.ReadLine(); //读取每行数据
while (strReadLine!=null )
{
strReadLine=strReadLine.Trim ();
Console.WriteLine(strReadLine); //屏幕打印每行数据
abc[counter] = strReadLine;
counter++;
strReadLine = srReadFile.ReadLine(); //读取每行数据
}
如何删除空行。。。
strReadLine = srReadFile.ReadLine()
if(string.isnullorwhitespace(strReadLine))
{
continue;
}
else
{
操作
}
楼上正解。
1楼