コード例 #1
0
        private int ObtenerIndice(Tempera tempera1)
        {
            int indice = -1;

            for (int i = 0; i < this._cantidadMaximaColores; i++)
            {
                if (this._colores.GetValue(i) != null)
                {
                    if (this._colores[i] == tempera1)
                    {
                        indice = i;
                        break;
                    }
                }
            }

            return(indice);
        }
コード例 #2
0
        private string Mostrar()
        {
            string cad = "";

            cad += "Cantidad de Colores: " + this._cantidadMaximaColores;
            foreach (Tempera temperaA in this._colores)
            {
                if (((object)temperaA) != null)
                {
                    cad += "\n" + Tempera.Mostrar(temperaA);
                }
            }

            //for (int i = 0; i < this._cantidadMaximaColores; i++)
            //{
            //    if(this._colores.GetValue(i) != null)
            //    {
            //        cad += "\n" + Tempera.Mostrar(this._colores[i]) + "\n";
            //    }
            //}

            return(cad);
        }
コード例 #3
0
 public static string Mostrar(Tempera tempera2)
 {
     return(tempera2.Mostrar());
 }