Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copyto array problem
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01113072
Message ID:
01113103
Views:
19
David,

Just as an FYI, you can combine the two statements inside your foreach loop like this:
Items.SetValue(Item.Text.Trim(), i++);
HTH,
Chad

>There seems to be something funny with using that copyto() and arraylist:
>
>anyway this was my work around, works ok, not sure if its the best way to do it.
>
>string[] Items = new string[ListBox2.Items.Count];
>int i=0;
>foreach (ListItem Item in ListBox2.Items)
>{
>Items.SetValue(Item.Text.Trim(), i);
>i+=1;
>}
_________________________________
There are 2 types of people in the world:
    Those who need closure
Previous
Reply
Map
View

Click here to load this message in the networking platform