Maximum String Length

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All

Simple question but i can't find the answer
What is the maximum length of the String data type in C#
Is it any different when developing in the .net compact framework

Thanks
Dave
 
Dave said:
Simple question but i can't find the answer:
What is the maximum length of the String data type in C#?
Is it any different when developing in the .net compact framework?

I suspect it's 2^31-1, i.e. int.MaximumValue.

Suffice to say you're likely to run into memory problems long before
you reach it.
 
Back
Top