Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding and removing items in collection
Message
From
26/10/2015 15:14:04
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01626445
Message ID:
01626456
Views:
40
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform