开发者

Does c# string have a length limit [duplicate]

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

Possible Duplicate:

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

Is there limit for a C# string to hold data?


Strings cannot have more than 231 characters, since String.Length is a 32-bit integer.

They're also limited by available memory.


string.Length is int, so string can contain Int.MaxInt bytes - 2,147,483,647

0

精彩评论

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

关注公众号