S
steve
i'd like to inherit from a class while changing the access-level of an
interface within the derived class. the below won't work...how do i properly
do this...i don't want to expose the "add" method of the "InheritedItems"
class to a caller even though i inherit from the "Items" class which has a
different access-level. i understand why this is a problem but don't know
how to accomplish what i've explained above as what i want to do. i assume
the answer is probably through the interface definition of "IItems" rather
than the class-level being inherited.
help please.
tia,
steve
----------
interface IItems
sub Add(byval Index as integer)
end interface
----------
class Items
implements IItems
public overridable sub Add(byval Index as integer) implements IItems.Add
' some code here
end sub
end class
----------
class InheritedItems
inherits Items
protected overrides sub Add(byval Index as integer)
' some code here
end sub
end class
interface within the derived class. the below won't work...how do i properly
do this...i don't want to expose the "add" method of the "InheritedItems"
class to a caller even though i inherit from the "Items" class which has a
different access-level. i understand why this is a problem but don't know
how to accomplish what i've explained above as what i want to do. i assume
the answer is probably through the interface definition of "IItems" rather
than the class-level being inherited.
help please.
tia,
steve
----------
interface IItems
sub Add(byval Index as integer)
end interface
----------
class Items
implements IItems
public overridable sub Add(byval Index as integer) implements IItems.Add
' some code here
end sub
end class
----------
class InheritedItems
inherits Items
protected overrides sub Add(byval Index as integer)
' some code here
end sub
end class