Process Question

bri189a

Well-known member
Joined
Sep 11, 2003
Messages
1,004
Location
VA
Ive noticed that with a Process object you can read and write from the standard input and output stream... being the case if you start a process and redirect your output anything that would show up in the Console will now be in the stream where Console.Write(whatever) is... you pull this off with the Process.StandardOutput.ReadToEnd()... question though is this is great for text... but what about objects.... is there a way to pass an object down a stream? If so how?

Thanks.
 
Objects in Streams

Hey,

My guess would be that you would have to serialize the object, then you can pass it to any kind of a stream, even a memory stream.

Hope this helps,
 
Ill look into that, but you may get back to me before I get to the answer... how do you do that?
 
Okay, got that figured out but I get errors when trying to read it back... Error in document (283, 1)... which I guess is the line number, but it writes just fine so I dont know.
 
Sorry,

I cant remember the details, it ever so happened that I can across the explanation while browsing individual message boards. I suggest you search for keywords like Serializable and Writing to Memory Stream, etc...
 


Write your reply...
Back
Top