Пример #1
0
        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);
        }
Пример #2
0
    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;
    }
Пример #3
0
 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;
 }