Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi I'm trying to create a file from a binary arrary. I can do this by saving it to disk but I need to pass the file as a reference to another class. Any ideas how I can do this without saving it to disk and then reloading it?

 

Cheers

 

Tim

  • Leaders
Posted (edited)
It depends on how you are passing a file. If the function is looking for a filename, then there is no way but to write the data to a file. Many functions/constructors, however, accepts streams, in addition to filenames, as a source for data, and it is possible to create a stream on a byte array (I believe that it would be the MemoryStream class). If you provide more info, we can provide better answers. Maybe show us the declaration of the function you are calling and the data you want to pass to it? Edited by snarfblam
[sIGPIC]e[/sIGPIC]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...