Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Collection behavior when adding a new item
Message
From
24/07/2006 17:52:34
John Baird
Coatesville, Pennsylvania, United States
 
 
To
24/07/2006 16:14:13
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01138855
Message ID:
01139473
Views:
15
Michel:

Off the top of my head this is one way... there are many others...
ArrayList al = new ArrayList();

object[] myObject = new object[2];
object[1] = "My first condition";
object[2] = "My second condition";
al.Add(myObject);

object[1] = "My first condition 2";
object[2] = "My second condition 2";
al.Add(myObject);

StringBuilder sb = new StringBuilder();
foreach (object[] obj in al)
{
     sb.Append(obj[1].ToString() + ', ');
     sb.Append(obj[2].ToString() + Environment.NewLine);
}

MessageBox.Show(sb.ToString());
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform