6

Possible Duplicate:
What is the maximum possible length of a .NET string?

I need to know how many characters a string can contain in C#?

Is it the same as the max length of a char array?

Community
  • 1
  • 1
Todd Moses
  • 10,969
  • 10
  • 47
  • 65

1 Answers1

16

String.Length is an int so the its size is 2,147,483,647. But consider using StringBuilder if you find yourself asking this question !

Vishal
  • 12,133
  • 17
  • 82
  • 128