String Copy On Write Behavior
We explain how the .NET framework implements copy-on-write semantics so that strings behave like value types despite being reference types, cover why mutating a string creates a new heap copy, and explain why the == operator always performs a value comparison on strings.