示例#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
文件: Type.cs 项目: hythof/csharp
 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;
 }