How to freeze a popsicle in .NET (make a class immutable)

Maybe slightly off topic but just out of curiosity 🙂 Why don’t you use “real” immutability? e.g. making Freeze() return an immutable copy (without “write methods” or any other possibility to change the inner state) and using this copy instead of the original object. You could even go without changing the state and return a new copy (with the changed state) on each write operation instead (afaik the string class works this). “Real immutability” is inherently thread safe.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)