Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Collection behavior when adding a new item
Message
De
22/07/2006 19:45:22
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Collection behavior when adding a new item
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01138855
Message ID:
01138855
Vues:
65
I am trying to understand something in regards to adding a new item in a collection. I have this code:
        Dim loCondition(2) As Object

        loCondition(1) = "NoDBUsers"
        loCondition(2) = "Something"
        oDropDownCondition.Add(loCondition)

        For Each loCondition In oDropDownCondition
            oApp.AddJavascriptMessage(loCondition(1))
        Next

        loCondition(1) = "NoDBUsers2"
        loCondition(2) = "Something"
        oDropDownCondition.Add(loCondition)

        For Each loCondition In oDropDownCondition
            oApp.AddJavascriptMessage(loCondition(1))
        Next
On the first For Each, I have a message "NoDBUsers", which is normal because I only have one item inserted in the collection. But, on the second For Each, I have two messages, which is normal because I added an additional item in the collection, but both messages are "NoDBUsers2". I just cannot understand this behavior. Can someone explain me why I do not obtain "NoDBUsers" followed by "NoDBUsers2"?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform