Advertisement
Fhernd

PruebaFigura.cs

Nov 14th, 2017
1,084
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1. using System;
  2.  
  3. public class PruebaFigura
  4. {
  5.     public static void Main ()
  6.     {
  7.         Figura[] figuras =
  8.         {
  9.             new Cuadrado (5, "Cuadrado #1"),
  10.             new Circulo (3, "Círculo #1"),
  11.             new Rectangulo (4, 5, "Rectángulo #1")
  12.         };
  13.        
  14.         Console.WriteLine ("Colección de Figuras");
  15.        
  16.         foreach (Figura figura in figuras)
  17.         {
  18.             Console.WriteLine (figura);
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement