Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Collection behavior when adding a new item
Message
De
24/07/2006 16:14:13
 
 
À
24/07/2006 12:55:03
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01138855
Message ID:
01139435
Vues:
16
>I referred back to you original post and I'm afraid I'm not sure what you are trying to achieve. Can you explain a little?

I have a collection. In this collection, I need to add a list of conditions. It can be from zero to x. Assuming I have 10 conditions to add, each of them have two parameters, I want to use only have variable for the add. I don't want to have to declare 10 variables because I would have to add 10 items in my collection. To me, I should be able to use the same variable all the time.

In VFP, I would do something like this, assuming I would use a cursor for the insertion:
LOCAL ARRAY laCondition[2]
laCondition[1]="My first condition title"
laCondition[2]="My first condition criteria"
INSERT INTO Something (Title,Criteria) VALUES (laCondition[1],laCondition[2])
laCondition[1]="My first condition title 2"
laCondition[2]="My first condition criteria 2"
INSERT INTO Something (Title,Criteria) VALUES (laCondition[1],laCondition[2])
But, in .NET, it seems that if I have an object, this confuses the collection.
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