Exemplo n.º 1
0
 static void Main(string[] args)
 {
     Canine spot = new Canine("Spot", "pug");
     Canine bob = spot;
     bob.Name = "Spike";
     bob.Breed = "beagle";
     spot.Speak();
     Dog jake = new Dog("Jake", "poodle");
     Dog betty = jake;
     betty.Name = "Betty";
     betty.Breed = "pit bull";
     jake.Speak();
     Console.ReadKey();
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Canine spot = new Canine("Spot", "pug");
            Canine bob  = spot;

            bob.Name  = "Spike";
            bob.Breed = "beagle";
            spot.Speak();
            Dog jake  = new Dog("Jake", "poodle");
            Dog betty = jake;

            betty.Name  = "Betty";
            betty.Breed = "pit bull";
            jake.Speak();
            Console.ReadKey();
        }