No entiendo la diferencia entre el ejemplo de funciones virtuales y el de polimorfismo anterior. šŸ˜• | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

No entiendo la diferencia entre el ejemplo de funciones virtuales y el de polimorfismo anterior. šŸ˜•

27th Apr 2018, 4:34 AM
SebastiƔn J. Tosco
2 Respostas
0
Polymorphism: interface IAnimal { virtual void MakeSound(); int Age{ set;get; } } class Dog : IAnimal { // public override MakeSound() { cw("woof"); } } public static void Main(string[] Argus) { // polymorphism IAnimal dog = new Dog() dog.MakeSound(); dog.Age = 3; } mi espaƱol es malo, dime si leo tu pregunta incorrectamente
4th May 2018, 12:42 AM
John
John - avatar
0
Gracias. šŸ‘ I'll read your code and i'll comment about this. šŸ˜
4th May 2018, 11:50 PM
SebastiƔn J. Tosco