ReadOnlyCollection<T>
realises the ICollection<T>
interface which has methods like Add and Remove. I know how to hide methods from Intellisense using attributes, but how is it possible to cause an actual compilation error if I try to use these methods?
(Btw, I know it doesn't make sense to call Add and Remove on a ROC, it's a question on causing compilation error for inherited memebers, not on using the correct data structure).