System.IO.StreamReader的读取方法(比如ReadLine(),ReadToEnd()...)为什么不能读取8M的txt文件??

解决方案 »

  1.   

    to System.IO.StreamReader的读取方法(比如ReadLine(),ReadToEnd()...)为什么不能读取8M的txt文件??出现什么问题,你如何写的
      

  2.   

    string path=this.File1.Value.ToString();(path是从system.Web.UI.HtmlControls.HtmlInputFile File1中读取的)
    StreamReader sr=new StreamReader(path);
    this.TextBox1.Text=sr.ReadLine();就三句话,不会有什么错的呀~~~~
      

  3.   

    忘记说了,同样的三句代码读取72K的TXT文件就可以
      

  4.   

    不是sr本身的问题
    http://community.csdn.net/Expert/topic/4821/4821206.xml?temp=.1996271中
    Ivony() 测试用的代码:string s = reader.ReadToEnd();
    “用了一个81M的普通文本文件来做测试FileReadTest.exe 1.txt
    共有 294586 行,耗时: 00:00:00.8328959
    共有 294587 行,耗时: 00:00:02.6531879”
    81M的都能读
      

  5.   

    webapp?参看
    http://blog.csdn.net/knight94/archive/2006/03/31/646252.aspx
      

  6.   

    textbox默认的MaxLength为32767
    有没有影响