I
Ishmael
When I call
stream = saveFileDialog1->OpenFile();
the type returned is IO::Stream.
Now I would like to write a string to the stream, like this:
stream->Write("mystring");
Unfortunately, since 'stream' is of the type IO::Stream, there is no
'Write' method associated with it. This implies to me that maybe I
should use a stream of type StreamWriter, which does have a 'Write'
method. However, for some reason, I apparently can't convert between
the two, like this:
stream = safe_cast<System::IO::StreamWriter ^>(tmp);
So how do I write text to the file I just opened?
Thanks for your help!
stream = saveFileDialog1->OpenFile();
the type returned is IO::Stream.
Now I would like to write a string to the stream, like this:
stream->Write("mystring");
Unfortunately, since 'stream' is of the type IO::Stream, there is no
'Write' method associated with it. This implies to me that maybe I
should use a stream of type StreamWriter, which does have a 'Write'
method. However, for some reason, I apparently can't convert between
the two, like this:
stream = safe_cast<System::IO::StreamWriter ^>(tmp);
So how do I write text to the file I just opened?
Thanks for your help!