public void Private_Field_Accessed_By_Nested_Type() { var parent = new ClassWithNestedType(); var child = new ClassWithNestedType.NestedTypeAccessingPrivateField(parent); Assert.AreEqual(99, parent.AField); }
public NestedTypeAccessingPrivateField(ClassWithNestedType parent) { this.parent = parent; this.parent.afield = 66; }