Hey guys,
I have read that the max length of a multiline TextBox control is 64K and of
a single line TextBox control is only limited by the amount of memory of the
user. Are those correct statements?
So, take this code for example:
StringBuilder sb = new StringBuilder();
for(int i = 1; i <= 70000; i++)
{
sb.Append("A");
}
textBox1.Text = sb.ToString();
All 70,000 of the letters are present in the textBox after that code
finishes. I don't understand how the limit is calculated. Since each char
is 2 bytes, doesn't that loop clearly go over the 64K limit?
What exactly is the 64K referring to?
Thanks for the help.