Ejemplo n.º 1
0
    static void Main()
    {
        TituloSubrayado ts = new TituloSubrayado();

        ts.SetTexto("hola que tal");
        ts.EscribirTexto();
    }
    static void Main()
    {
        Titulo[] t = new Titulo[4];

        t[0] = new Titulo(1, 1, "Libro de Petete");
        t[1] = new Titulo(5, 5, "Recetas de la abuela");
        t[2] = new TituloSubrayado(10, 10, "Las memorias de Pedro", '-');
        t[3] = new TituloSubrayado(15, 15, "El Señor de los Anillos", 'x');


        for (int i = 0; i < t.Length; i++)
        {
            t[i].EscribirTexto();
        }

        Console.WriteLine();
    }