I changed my property type from a List<T> to IReadOnlyList<T>, but I was using the List<T>.Find() method and now the compiler gives error CS1061: 'IReadOnlyList<T>' does not contain a definition for 'Find' and no accessible extension method 'Find' accepting a first argument of type 'IReadOnlyList<T>' could be found (are you missing a using directive or an assembly reference?). How can I find an item from an IReadOnlyList<T>?
IReadOnlyList<T> implements IEnumerable<T>, you can use IEnumerable<T>.FirstOrDefault() to replace List<T>.Find().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With