C# 读取txt文件
   public static List<int>  GetPage()
        {
            string strpath = @"D:\test.txt";
            FileStream fs = new FileStream(strpath, FileMode.Open, FileAccess.Read);
            StreamReader sr = new StreamReader(fs, Encoding.Default);
            sr.BaseStream.Seek(0, SeekOrigin.Begin);
            string str = sr.ReadLine();
            while (str != null)
            {
                      str = sr.ReadLine();
            }
            sr.Close();
            fs.Close();
            return ListPage;
        }
    Goals determine what you are going to be!
 
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号