开发者

Does c# string have a length limit [duplicate]

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜