public static void Main() { var naughty = new DerivedMutable(1); var example = new ExampleOfUnsealedImmutable(naughty); naughty.OtherValue = 10; }
public static void Main() { var naughty = new DerivedMutable(1); UnsealedSemiImmutable isThisImmutable = naughty; Console.WriteLine(isThisImmutable); // 0 naughty.OtherValue = 10; Console.WriteLine(isThisImmutable); // 10! State has changed. }