4
Reply

pending \0 in string?

George George

George George

Jun 24 2008 5:15 AM
1.9k

Hello everyone,


I am using the following code to read a string. The content of message is ends with a lot of \0 characters. Why and how to remove them?

(context is an instance of HttpListenerContext, and my code is read Http request from begin to end)

[Code]
                using (StreamReader requestStream = new StreamReader(context.Request.InputStream))
                {
                    message = requestStream.ReadToEnd();
                }
[/Code]


thanks in advance,
George


Answers (4)
Next Recommended Forum