0
What is difference between mutable and immutable data types ?
I want to know the difference between string and string builder .
1 Odpowiedź
0
A mutable object, by contrast, has data fields that can be altered. ... An object is mutable if, once created, its state can be changed by calling various operations on it, otherwise it is immutable. Immutable String. In C# (and .NET) a string is represented by class System.String.
All string object are immutable in C#, String builder would allow us to work alternatively like as Mutable string in C#.