how to save a Stream class
-
if i got data in a Stream class, how can i save it to a directory? please help, thanks
-
if i got data in a Stream class, how can i save it to a directory? please help, thanks
Write it to a FileStream[^] :)
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
if i got data in a Stream class, how can i save it to a directory? please help, thanks
Err..
Stream myStream = ...
byte[] data = new byte[myStream.Length];
myStream.Write(data, 0, (int)myStream.Length);
FileStream fs = new FileStream(@"C:\", FileMode.Create);
fs.Write(data, 0, data.Length);
fs.Close();Would probably work. And you should probably buy yourself a beginners book.
My current favourite word is: Nipple!
-SK Genius
-
Err..
Stream myStream = ...
byte[] data = new byte[myStream.Length];
myStream.Write(data, 0, (int)myStream.Length);
FileStream fs = new FileStream(@"C:\", FileMode.Create);
fs.Write(data, 0, data.Length);
fs.Close();Would probably work. And you should probably buy yourself a beginners book.
My current favourite word is: Nipple!
-SK Genius
theoretically u r right but in the "Stream" class there is no "Length" property. :sigh:
-
theoretically u r right but in the "Stream" class there is no "Length" property. :sigh:
-
thank u guys, i got the point!