Skip to content

Conversation

dalibormesaric
Copy link

Updated size of string from 10KB to 20KB according to

Note: Strings are stored as UTF-16 characters in .NET so each char takes two bytes in memory.

but also after running

Console.WriteLine(
    System.Text.Encoding.Unicode.GetByteCount(
        new String('x', 10 * 1024)));

// Answer: 20480

@dalibormesaric
Copy link
Author

Also created dotnet/AspNetCore.Docs#33937

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant