Replace inherited member name

  • Thread starter Thread starter Dinis Correia
  • Start date Start date
D

Dinis Correia

Hi all,
How can I replace an inherited member name?

I've built a class that inherits from KeyedCollection(Of ..., ...). I would
like to replace base class Items property with Fields property. Is this
possible?

TIA,
DC
 
Dinis said:
Hi all,
How can I replace an inherited member name?

I've built a class that inherits from KeyedCollection(Of ..., ...). I
would like to replace base class Items property with Fields property. Is
this possible?

TIA,
DC

No, that's not possible. You can't remove members from a class that you
inherit.

You can create a Fields property that calls the Items property in the
base class, and override the Items property to throw an exception.
That's the closest that you can get.
 
Back
Top