public void SetNestedProperty_Success() { var structB = new StructB(Guid.NewGuid().ToString(), new StructA(true)); var actual = structB.Remute(x => x.StructA.Value, false); Assert.AreNotSame(structB, actual); Assert.AreEqual(false, actual.StructA.Value); }
public static void showStruct() { StructA a = new StructA(); StructB b = new StructB(); StructC c = new StructC(); Console.WriteLine(a); Console.WriteLine(b); Console.WriteLine(c); Console.WriteLine(a.GetType()); Console.WriteLine(b.GetType()); Console.WriteLine(c.GetType()); // Console.WriteLine(a == b); // Can't comparable // Console.WriteLine(a == c); // Can't comparabl; // Console.WriteLine(b == c); // Can't comparabl; }