Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Product product = new Product(1, "Laptop", 7000);


            var data = product.Clone() as Product;

            Console.WriteLine(data.Equals(product));
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Adventure adventure = new Adventure();

            Product product = new Product(100, "test", 350);

            adventure.Entities.Add(product);

            Person person = new Person("test");

            adventure.Entities.Add(person);

            adventure.Entities.Add(product.Clone() as Product);
            adventure.Entities.Add(person.Clone() as Person);
        }