Ejemplo n.º 1
0
    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.
    }
Ejemplo n.º 2
0
 public ExampleOfUnsealedImmutable(UnsealedSemiImmutable foo)
 {
     this.foo = foo;
 }
 public ExampleOfUnsealedImmutable(UnsealedSemiImmutable foo)
 {
     this.foo = foo;
 }