Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding and removing items in collection
Message
De
26/10/2015 15:14:04
 
 
À
26/10/2015 15:06:26
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01626445
Message ID:
01626456
Vues:
39
>From your code it looks as if the collection is actually a Dictionary of arrays.
>But if that's the case I don't understand the "oInnerJoin.Add(loObject, lnKey, 1)" line - I'd expect
>oInnerJoin.Add(lnKey,loObject);

The key is the second parameter, not the first one.

>IAC I would look in the collection and, if the key already exists then just modify the value. Only add it if is not already present.

Yes, in this case, as it is an object, I can simply update the object as is, once I get a reference to it from the .Item() method.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform