rt

解决方案 »

  1.   

    string[] arr=File.ReadAllLine("");string s;
    using (StreamReader sr = new StreamReader("", Encoding.Default)) 
    {
          s = sr.ReadToEnd();
     }
      

  2.   

    ReadLine()是读取一行
    读到第二行判断即可。
      

  3.   

    1.你可以每次读一行,读第2次的第一个字母就是
    2.ReadAllline,第2个元素的第一个字母就是
      

  4.   

    int index = 0;
    string path = "...txt";
    FileStream fs = new FileStream( path , FileMode.Open, FileAccess.Read);
    StreamReader sr = new StreamReader(fs, Encoding.GetEncoding("Shift-jis"));
    string str = sr.ReadLine();
    while (str != null)
    {
     index++;
     if( index == 2)
     {
       if(str.StartsWith("xxx"))
       {
        ....
       }
     }
     str = sr.ReadLine();
    }
    sr.Close();
    fs.Close();希望有点帮助