Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Last active December 25, 2015 05:49
Show Gist options
  • Save Fhernd/6926904 to your computer and use it in GitHub Desktop.
Save Fhernd/6926904 to your computer and use it in GitHub Desktop.
Demostración de herencia y propiedades en C#.
using System;
public class Circulo : Figura
{
private int radio;
public Circulo (int radio, string idFigura) : base (idFigura)
{
this.radio = radio;
}
public override double Area
{
get
{
return radio * radio * Math.PI;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment