开发者

What is the maximum size for a string in C#? [duplicate]

开发者 https://www.devze.com 2023-01-28 14:24 出处:网络
This question already has answers here: Closed 12开发者_JAVA技巧 years ago. Possible Duplicate: What is the maximum possible length of a .NET string?
This question already has answers here: Closed 12开发者_JAVA技巧 years ago.

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?


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 !

0

精彩评论

暂无评论...
验证码 换一张
取 消