开发者

How to convert System.Data.Linq.Binary to a Stream?

开发者 https://www.devze.com 2023-01-06 23:26 出处:网络
Thought I could use the BinaryWriter but haven\'t had any luck.Suggest开发者_Go百科ions?You need an instance of a Stream derived class to provide the Stream implementation.MemoryStream is the ticket:

Thought I could use the BinaryWriter but haven't had any luck. Suggest开发者_Go百科ions?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消