- , .NET UTF-16. char Int16 ( ) ( char ).
If you are dealing only with ASCII, yes, you can put the string in an array of bytes, which takes up half the space as a char array and does not lose information. However, as John said, this is not a very convenient way to work with strings. You have 2 GIGABYTES addresses available for one line. As bytes, yes, you get 2 billion characters, but as strings, you still get 1 BILLION characters in one line. If you really need more than one line, I'm worried about what you think you need.
source
share