here a simple helper method to convert a List collection to an Array.
static Array arrayFromList(List _list)
{
Array array;
ListIterator listIterator;
int i;
array = new Array(_list.typeid());
listIterator = new ListIterator(_list);
for (i = 1; listIterator.more(); ++i)
{
array.value(i, listIterator.value());
listIterator.next();
}
return array;
}
No comments:
Post a Comment