Beispiel #1
0
        static void Copy()
        {
            var user = new User()
            {
                Id          = 2,
                Name        = "y1",
                Description = "aa"
            };
            var title = new Article()
            {
                Id          = 3,
                Name        = "yy",
                Description = "bb"
            };

            var cls    = new MetaClass(typeof(User));
            var title1 = cls.CopyTo(user, title, "Id,Description");

            Console.WriteLine("Articile.Id(2)=" + title.Id.ToString());
            Console.WriteLine("Articile.Name(yy)=" + title.Name.ToString());
            Console.WriteLine("Articile.Description(aa)=" + title.Description.ToString());
        }