如何System.Data.Linq.Binary转换为流? [英] How to convert System.Data.Linq.Binary to a Stream?

查看:359
本文介绍了如何System.Data.Linq.Binary转换为流?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以为我可以使用的BinaryWriter,但还没有任何运气。建议?

Thought I could use the BinaryWriter but haven't had any luck. Suggestions?

推荐答案

您需要一个Stream派生类的实例,以提供流实现。 MemoryStream的是门票:

You need an instance of a Stream derived class to provide the Stream implementation. MemoryStream is the ticket:

var stream = new MemoryStream(bin.ToArray());

其中,斌是你的二进制实例。

where "bin" is your Binary instance.

这篇关于如何System.Data.Linq.Binary转换为流?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆