8

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

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
Abe Miessler
  • 82,532
  • 99
  • 305
  • 486

1 Answers1

11

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.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536