2010年3月18日

C# Stream 和 byte[] 之间的转换

摘要: /// <summary> /// 将 Stream 转成 byte[] /// </summary> public byte[] StreamToBytes(Stream stream) { byte[] bytes = new byte[stream.Length]; stream.Read(bytes, 0, bytes.Length); // 设置当前流的位置为流的... 阅读全文

posted @ 2010-03-18 15:57 chuncn 阅读(520) 评论(0) 推荐(0) 编辑

导航