>Why does (in the code below) the message should appear as "keep-alive -
>keep-alive - test" but it only appears as "keep-alive - keep-alive".
Because the MessageBox will only show the string up to the first '\0'
character.
>That is why the last comparation (Equals) isn't getting true. Is it
>from the "Convert.ToByte('\0')" that does the comparation false?
Yes one string will have a null character at the end but the literal
"keep-alive" doesn't.
Mattias

Signature
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nuno Magalhaes - 30 Nov 2005 21:03 GMT
Thanks for the reply.
I solved the problem with a Substring(0,10) comparision.
> >Why does (in the code below) the message should appear as "keep-alive -
> >keep-alive - test" but it only appears as "keep-alive - keep-alive".
[quoted text clipped - 14 lines]
> http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
> Please reply only to the newsgroup.