コード例 #1
0
        //Ok.
        private string Mostrar()
        {
            string acum = "El color es ";

            for (int i = 0; i < this._colores.Count; i++)
            {
                acum = acum + Tempera.Mostrar(this._colores[i]);// String.Concat(acum,Tempera.Mostrar(this._colores[i]));
            }


            return(acum);
        }
コード例 #2
0
        static void Main(string[] args)
        {
            Tempera tempera1 = new Tempera(ConsoleColor.Blue, 3, "Pato feo");


            Paleta paleta1 = new Paleta(3);

            paleta1[0] = tempera1;

            Console.WriteLine((string)paleta1);

            Console.WriteLine(Tempera.Mostrar(paleta1[0]));

            Console.ReadKey();

            Console.WriteLine(Tempera.Mostrar(paleta1[5]));

            Console.ReadKey();
        }
コード例 #3
0
 //OK
 public static string Mostrar(Tempera a)
 {
     return(a.Mostrar());
 }