G
Guest
Dear all,
How can I convert a list of items from ArrayList into an array of non system
type objects?
e.g. The following codes have error:
public class myClass
{
int i;
}
void Main()
{
ArrayList list = new ArrayList(0);
list.add(new myClass());
list.add(new myClass());
...
myClass[] cls = list.ToArray(); // this line doesn't work
}
How can I convert a list of items from ArrayList into an array of non system
type objects?
e.g. The following codes have error:
public class myClass
{
int i;
}
void Main()
{
ArrayList list = new ArrayList(0);
list.add(new myClass());
list.add(new myClass());
...
myClass[] cls = list.ToArray(); // this line doesn't work
}