I have an ICollection called foos in my class which I want to expose as read-only (see this question). I see that the interface defines a
My recommendation is to return use a ReadOnlyCollection
Normally I would suggest using the appropriate interface. But given that the .NET Framework does not currently have a suitable IReadOnlyCollection, you must go with the ReadOnlyCollection type.
Also you must be aware when using ReadOnlyCollection, because it is not actually read-only: Immutability and ReadOnlyCollection