tags:

views:

111

answers:

1
+3  Q: 

string to binary[]

I have a string I need to feed to a com object that has a LoadFromStream method accepting "object Data". I'm guessing this should be a byte[].

Rather basic question: I got my MemoryStream all filled and ready to go. What's the best way to convert it to binary[]? Should I manually read it into the array one by one or is there an easy built in way?

+2  A: 

MemoryStream has a ToArray() method which returns a byte[].

Will Dean
Doh, once again I miss the obvious :P
borisCallens