| Start |
|---|
| System.String class In C# (and .NET) a string is represented by class System.String. The The System.String class is immutable, i.e once created its state cannot be altered. So all the operations you perform on a string like Substring, Remove, Replace, concatenation using See the following program for demonstration - This will print |
| Strings and immutability Immutable types are types that when changed create a new version of the object in memory, rather than changing the existing object in memory. The simplest example of this is the built-in Taking the following code, that appends " world" onto the word "Hello" What is happening in memory in this case is that a new object is created when you append to the The mutable equivalent for a Taking the following code When you run this, you are modifying the |
Read Article
https://develop.horje.com/learn/1434/reference