July 2015
Intermediate to advanced
1300 pages
87h 27m
English
Working with strings is one of the most common developer activities. In the .NET common type system, System.String is a reference type. This might be surprising because strings actually behave like value types. The String class cannot be inherited, so you can’t create a custom class derived from it. In addition, String objects are immutable, like value types. What does this mean? It means that when you create a new String, you cannot change it. Although you are allowed to edit a string’s content, behind the scenes, the CLR does not edit the existing string; it instead creates a new instance of the String object that contains your edits. The CLR then stores such String objects in the heap and returns a reference to them. We ...