No, the difference is only 2 characters, probably due to a cr/lf sequence in
the C string. Anyway, you can't put anything but characters in a string and
the string the OP posted is a valid string ,unicode or not.
Willy.
"Morten Wennevik" <Mo************@hotmail.comwrote in message
news:op***************@tr024.bouvet.no...
Hi Mike,
The difference in length might come from C# using unicode characters in
strings. Representing anything but text data inside a string is a bad
idea and is bound to cause errors.
On Wed, 20 Sep 2006 22:45:51 +0200, AMP <am******@gmail.comwrote:
I have a string:(actually its a line turned into a string)
"30 40 04 40 FF 3F 31 40 00 39 B0 12 4E 40 B0 12'
in c strlen() gives me 49
but c# :
LinetoString = infile.ReadLine();
linelen= LinetoString.Length;
Gives me 47.(Sounds more accurate)
Both doc say the number is before any terminating Chars.
Any help.
Can I "pad" it?
Thanks
Mike
--
Happy Coding!
Morten Wennevik [C# MVP]