General information
Title:
Copyto array problem
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only