FileStream 如何与 Socket 或者 NetworkStream 很好的联合呢, 我现在的传输文件方法只是一个一个byte的读,然后判断是否为-1,请问有什 上面的i 忘记convert成byte了。。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 byte[] bIn =byte[ns.Length];ns.Read(bIn,0,ns.Length);fs.Write(bIn,0,ns.Length); byte [] buffer = new byte[256];int bytesRead = ns.Read(buffer,0,buffer.Length);if(bytes > 0) fs.Write(buffer,0,bytesRead);else /* .... */ ns原来有length哦我一时发傻没想到我是猪谢谢你们了 vwahaha 竟然有这样的事msdn:The length of the data available on the stream. This property is not supported. wo ding , wen ti hai mei jiejue a ~~ 数据类型问题 关于分辨率的问题 关于DataList递归 急 高分 问几个语法的问题 @_@ 大家进来看下是XtraGrid 的bug吗? 数据集中的元素序列化问题,求高手帮忙! 有能力者请进,关于panel控件响应的问题,等待中,解答者给100分 找到一个标准的负荷竞赛数据 急急急!!!SQL CE TOOLS sql server 语句请教 help:用StreamReader读个html的内容,出现乱码?? 既然我们的webservice的webmethod是返回一个soap的消息,再由代理类来转换成当地的数据类型,那如何能直接用dtd和stylesheet来截获和显示
ns.Read(bIn,0,ns.Length);
fs.Write(bIn,0,ns.Length);
if(bytes > 0)
fs.Write(buffer,0,bytesRead);
else
/* .... */
The length of the data available on the stream. This property is not supported.