我正在尝试从文件中跳过第一行,并继续从第二行读取文件 [英] I am trying to skip the first line from a file and continue to read the file from second line

查看:132
本文介绍了我正在尝试从文件中跳过第一行,并继续从第二行读取文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

string []行= File.ReadAllLines(fname);

string[] lines = File.ReadAllLines(fname);

String sa [] = lines.split(,");

String sa[] = lines.split(",");

for(int i = 0; i> 0; i ++)
         {
             sa1 = sa [1] .trim();
            
        }

for(int i=0;i>0;i++)
        {
            sa1= sa[1].trim();
            
        }

我想从文件中跳过第一行,然后继续从第二个文件中读取.请帮助我.

I want to skip the first line from the file and continue reading from the second file.please help me guys.

推荐答案

for(int i=1;i<sa.GetLenght(0);i++)
        {
            diagnostics.debug.print(sa[i]);
        }



这篇关于我正在尝试从文件中跳过第一行,并继续从第二行读取文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆