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

后端 未结 8 1673
梦毁少年i
梦毁少年i 2020-11-22 02:48

What is the longest string that can be created in .NET? The docs for the String class are silent on this question as far as I can see, so an authoritative answe

8条回答
  •  灰色年华
    2020-11-22 03:38

    Since String.Length is an integer (that is an alias for Int32), its size is limited to Int32.MaxValue unicode characters. ;-)

提交回复
热议问题