Object references, state and side effects

C#, Java and other languages have the same behaviour when it comes to reference types. public class SomeClass { public string someField; } var instance1 = new SomeClass(); // instance1 is a reference to an object in memory var instance2 = instance1; // instance2 is a...