Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/10/2009, 08:16
Avatar de jahman
jahman
 
Fecha de Ingreso: noviembre-2003
Ubicación: Oslo
Mensajes: 230
Antigüedad: 20 años, 5 meses
Puntos: 0
Exclamación If con string de exclusion

que tal?
les cuento e tratado de hacer un array con una lista de categorias q debo excluir
pero me lo muestra tantas veces como elementos tiene el array por cada uno que deberia mostrar, la idea es que si la categoria esta en la lista no deberia mostrarlo, espero que me puedan ayuda. Gracias

Código:
string[] exclu = { "Merke", "Hentet inn", "Boligtype", "Båttype", "Eieform", "Ferietype", "Hovedkategori", "Jobbkategori", "Kategori" , "Kommune" , "Land" , "MC Type" , "Modell", "Scooter/Moped", "Sted", "Stillingsnivå", "Type lokaler", "Underkategori" };
            int er = exclu.Length;
            foreach (SortArea sortArea in UserInfo.CurrentMarket.SortAreas)
            {
                for (int he = 0; he < er; he++)
                {
                    if (sortArea.Text != exclu[he])
                        Prue.Text += sortArea.Text + ":" + exclu[he] + "<br /> ";
                }
            }