Last active
December 25, 2015 05:49
-
-
Save Fhernd/6926920 to your computer and use it in GitHub Desktop.
Demostración de herencia y propiedades en C#.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Rectangulo : Figura | |
{ | |
private int ancho; | |
private int alto; | |
public Rectangulo (int ancho, int alto, string idFigura) : base (idFigura) | |
{ | |
this.ancho = ancho; | |
this.alto = alto; | |
} | |
public override double Area | |
{ | |
get | |
{ | |
return ancho * alto; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment