I have recently started to read up on mutable and immutable objects in C# and the constant thing i find wherever i read is hat being immutable makes things threadsafe and useful when used as keys in hashtables but what i dont understand is as far as the concept goes while we cannot change the content we can change the reference that is :
string s = "Hi";
s = "Bye";
While here the reference of s is changed to "Bye" but the main thing is that the content of s (or rather what it was pointing to) has changed and from the point of view of programming that is the same, so how does this make a particular function threadsafe or usable in hashtable if the string is changed ??