String length in bytes
am 25.01.2008 11:32:00 von GuyBeing lazy here...
How many bytes are used to store a string?
I would guess the (number of characters * 2) + 4
is that correct?
cheers
Guy
Being lazy here...
How many bytes are used to store a string?
I would guess the (number of characters * 2) + 4
is that correct?
cheers
Guy
guy
> Being lazy here...
>
> How many bytes are used to store a string?
>
> I would guess the (number of characters * 2) + 4
>
> is that correct?
Well, where did you get the 4 from? I believe it's more like 12 or 16 -
but the basics are right.
--
Jon Skeet -
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
http://www.codeproject.com/KB/dotnet/strings.aspx
LP,
Dejan
Many thanks,
just what I needed!
Guy
"Dejan Stanic" wrote:
> http://www.codeproject.com/KB/dotnet/strings.aspx
>
> LP,
> Dejan
>
>