Reputation: 9940
I'm looking at an instance of ICollection called pxe in the VS Watch window. I understand that the Raw View is meant to show the object without anything extra added. The property IsReadOnly is a member of the ICollection interface and is public by default. Why is it listed in the Non-public members in the Watch window?
Upvotes: 0
Views: 75
Reputation: 146
ReadonlyCollection<T>
implements both IList
and ICollection<T>
and both interfaces contains IsReadOnly
property. ReadonlyCollection<T>
implements this property explicitly, so you cannot access it without casting ReadonlyCollection<T>
to IList
or ICollection<T>
, and so visual studio treat it as non-public member
Upvotes: 3