The problem is in the internal code of the CopyTo
method.
MSDN says:
The type of the source ICollection cannot be cast automatically to the type of the destination array.
That means that the array must be able to convert without explicit conversion. Otherwise the method call will fail.
Instead of using CopyTo
, you should use a foreach
and copy them by hand one by one.