Add Invariant IReadOnlyCollection<T> and IReadOnlyList<T> interfaces #30661
Labels
api-needs-work
API needs work before it is approved, it is NOT ready for implementation
area-System.Collections
Milestone
If #31001 gets implemented through default interface implementation the next logical addition would be to add invariant versions of the
IReadOnlyCollection<T>
andIReadOnlyList<T>
interfaces as some of the read-only methods onICollection<T>
andIList<T>
were not included in the read-only interfaces because that would prevent the generic type argument from being declared covariant.ICollection<T>
andIList<T>
would then inherit these new interfaces and use default interface implementation to forward their calls to their own versions.Proposed API
Open Questions
Invariant
suffix a good naming pattern?CopyTo
method be included as it seems to be a deprecated API or at least from my perspective?Updates
CopyTo
method as it appears to be a deprecated API.The text was updated successfully, but these errors were encountered: