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

string[] Items = new string[ListBox2.Items.Count];
ListBox2.Items.CopyTo(Items, 0);

The error:

System.InvalidCastException: At least one element in the source array could not be cast down to the destination array type.

Not quite sure why I'm getting this one. I'm using the exact same code for a windows app and it works fine?
Next
Reply
Map
View

Click here to load this message in the networking platform