如题
在线等
先谢过

解决方案 »

  1.   

    filestram或者streamreader
    详细说明可以去查msdn
      

  2.   

    StreamReader sr=File.OpenText(path);
    str[i]=sr.ReadToEnd();
      

  3.   


                        StreamReader sr = new StreamReader("C:\\a.txt");
                        while (!sr.EndOfStream)
                            Console.Write(sr.ReadLine());
      

  4.   

    StreamReader sr=File.OpenText(path);
        string str=sr.ReadToEnd();
      

  5.   

          FileStream fs = new FileStream("D:\\abc.txt", FileMode.Open, FileAccess.Read);
                StreamReader reader = new StreamReader(fs);
                string line = "";
                while ((line = reader.ReadLine()) != "")
                {
                    Debug.WriteLine(line);
                }
      

  6.   

     StreamReader sr = new StreamReader(filepath);
     string txt= sr.ReadToEnd();
     sr.Close();
      

  7.   

    比忘了引用空间名
    using System.IO