Open ptr1120 opened 1 month ago
Thank you! I've confirmed, it is bug of implementation, if exists array's covariance throws runtime exception. I'll fix it.
For example, if you change to this will work fine.
var myClass = new MyListHolder
{
Bases = new IMyInterface []{ one }
};
Also you can change like this
var myClass = new MyListHolder
{
Bases = [one]
};
Hello, I am trying to serialize a class that holds a collection of objects given by an interface. But I always get
ArrayTypeMismatchException Attempted to access an element as a type incompatible with the array.
Any idea what I am doing wrong?