Example #1
0
        public int obtenerIndice(Tempera temp)
        {
            for (int i = 0; i < this._colores.Length; i++)
            {
                if (this._colores[i] == temp)
                {
                    return(i);
                }
            }

            return(-1);
        }
Example #2
0
        private string Mostrar()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("Cantidad Maxima " + this._cantidadMaximaColores);

            for (int i = 0; i < this._cantidadMaximaColores; i++)
            {
                if (this._colores.GetValue(i) != null)
                {
                    sb.AppendLine("Numero de la tempera  " + (i + 1));
                    sb.AppendLine("Color de la tempera  " + Tempera.Mostrar(this._colores[i]));
                }
            }

            return(sb.ToString());
        }
Example #3
0
 /// <summary>
 /// Metodo sobrecargado publico que llama al privado
 /// </summary>
 /// <param name="temp"></param>
 /// <returns></returns>
 public static string Mostrar(Tempera temp)
 {
     return(temp.Mostrar());
 }