Page 1 of 1

Dump text

Posted: Tue Mar 19, 2013 8:51 am
by stevep
Hi Alt,

MM7 server works well, I have a quick question.

If I receive a text file as an MMS part, is there a convenient way to read the text out of the file from the part.Data byte[] rather than saving the file and then reading in the content?

I could save the part, read in the text and then delete the temporary file but it might be more efficient to read it from the stream.

Steve

Re: Dump text

Posted: Wed Mar 20, 2013 5:49 pm
by alt
Hi Steve,

You can try
string text = Encoding.UTF8.GetString(part.Data);