public static Tempera operator +(Tempera p, Tempera t)
        {
            Tempera retorno = new Tempera(p._marca, p._color, p._cantidad);

            if (p == t)
            {
                retorno._cantidad += t._cantidad;
            }
            return(retorno);
        }
        private String Mostrar()
        {
            String retorna = "";

            foreach (Tempera color in this._colores)
            {
                retorna += Tempera.Mostrar(color);
                //retorna += color.ToString()+"ss";
            }

            return(retorna);
        }
Exemple #3
0
        private int obtenerIndice(Tempera t)
        {
            int retorno = -1;
            int i       = 0;

            foreach (Tempera color in this._colores)
            {
                if (t == color)
                {
                    retorno = i;
                    break;
                }

                i++;
            }
            return(retorno);
        }
 public static String Mostrar(Tempera t)
 {
     return(t.Mostrar());
 }