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); }
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); }
public static string Mostrar(Tempera tempera2) { return(tempera2.Mostrar()); }