"Patrice" <sc****@chez.com> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Just give it a try. Likely Integer.MaxValue at best. That is not a
practical limit but rather therorical limit (IMO yuou 'll have an out of
memory error before)
Well, its not quite that simple. int.MaxValue is the most the string class
itself could handle, you are right, but since characters take up two bytes,
that many characters would go way beyond the max possible allocation. The
best theoretical high value is 2^31(or 2147483648) characters, since that is
exactly how many would fit in memory. Practially it'd be much, much smaller.
The bigger question is what is wrong with your design if you are dealing
with strings that are gigabytes in length.