Page 1 of 1

Supporting ReadOnlyCollection

Posted: Thu Oct 14, 2021 4:41 pm
by robotSmith
Hello Hello,

(first sorry for the three different posts, but I wanted to keep things separated)

I wanted to know if you had plans on adding ReadOnlyCollection<T> as a supported type? I could not find a way of adding it myself to the ES3Types so is there a workaround that I can make it work (other than using Lists)?

TIA!

Re: Supporting ReadOnlyCollection

Posted: Thu Oct 14, 2021 4:50 pm
by Joel
I'm afraid that because of the very nature of ReadOnlyCollection being read-only, it's not serializable at runtime. You would need to convert it to a List and save to and from this.

All the best,
Joel

Re: Supporting ReadOnlyCollection

Posted: Thu Oct 14, 2021 5:27 pm
by robotSmith
ah I see. That's actually an easy work around. Thanks for your help as always Joel!