上面的i 忘记convert成byte了。。

解决方案 »

  1.   

    byte[] bIn =byte[ns.Length];
    ns.Read(bIn,0,ns.Length);
    fs.Write(bIn,0,ns.Length);
      

  2.   

    byte [] buffer = new byte[256];int bytesRead = ns.Read(buffer,0,buffer.Length);
    if(bytes > 0)
        fs.Write(buffer,0,bytesRead);
    else
        /* ....  */
      

  3.   

    ns原来有length哦我一时发傻没想到我是猪谢谢你们了
      

  4.   

    vwahaha 竟然有这样的事msdn:
    The length of the data available on the stream. This property is not supported.
      

  5.   

    wo ding , wen ti hai mei jiejue a ~~