Nicolas <ni*****@serpe.org> wrote:
In what encoding? In the CLR itself, or in a particular encoding?
Just as it is, I mean the space it takes on RAM.
I think a String class stores a string as an array of char, just want to
know what place this array occupies.
It's not actually an array of char itself - string is a very unusual
type, in that the size of the object itself depends on the contents.
I believe the size of the object is 20+(n/2)*4 where n is the number of
characters in the string. (The result of n/2 is rounded down.)
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too