1
Reply

What are immutable objects in C#?

John

John

May 07, 2012
1.5k
0

    Immutable objects are objects which once loaded cannot be changed / modified by any way external or internal. The String class is a good example of a immutable class. You cannot actually modify the string stored, only create new classes.Hence the following does not 'modify' the string s, but creates a new variable with the new string containing the old value plus the new value:s += "World";

    Shraban
    February 04, 2016
    0