Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public abstract class Figura
- {
- private string idFigura;
- public Figura (string idFigura)
- {
- IdFigura = idFigura; // asigna el valor de idFigura a la propiedad IdFigura
- }
- public string IdFigura
- {
- get
- {
- return idFigura;
- }
- set
- {
- idFigura = value;
- }
- }
- // La propiedad Area es de sólo-lectura
- public abstract double Area
- {
- get;
- }
- public override string ToString ()
- {
- return IdFigura + " Área = " + string.Format("{0:F2}", Area);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement