Inherited Members are hidden with an ObjectDataSource

Hi, I hope this is the right forum to post this question... from what I read I think it is.

Edit : This is the third time that the moderators move my post from forum to forum... I am aware that this is not VB-related at all, but my post was moved here.

I have the following structure :

- An IDictionaryView<T, U> interface which defines a function called "Count"
- An IWritableDictionaryView<T, U> interface which extends IDictionaryView<T, U> with a couple of methods
- A DictionaryEx<T, U> class which implements IWritableDictionaryView<T, U>
- A Test class which holds a private instance of DictionaryEx<T, U> (the actual types do not matter here), with a property that exposes it publically (read/write)

I have an ObjectDataSource that points on the Test class.
Here are the scenarios, with the problematic one :

- If the public property in Test exposes the DictionaryEx instance as a IDictionaryView<T, U> by down-casting it, the "Data Source" tab shows the "Count" member as expected.
- If the public property in Test exposes the DictionaryEx instance as a IWritableDictionaryView<T, U> also with a down-cast, the "Data Source" tab does NOT show the "Count" member even though it's implemented via inheritance.

My question is... why The member is there, and if I duplicate it in IWritableDictionaryView<T, U>, the compiler complains that I should use "new" if I want to shadow it... which I do not want to do. Although by duplicating it, the member appears in Data Sources.

Is this by design What is the best way to overcome this problem

Thanks!




Answer this question

Inherited Members are hidden with an ObjectDataSource

  • Inherited Members are hidden with an ObjectDataSource