Known that C# support interface inheretence, i want to create an interface "B" that inherits from a base interface "A" but also hides some interface "A" members, just like a Class uses explicit interface implementation to hide an interface member, unless the class instance is casted to the implemented interface:
MyExample:
First i create an interface IDbObject
with some members and methods
public interface IDbObject
{
IDbObject ParentObject
{
get;
}
.
.
.
}
and then I create a second interface IDbConstraint
that inherits the first interface but since inheritance is specialization I know more about the ParentObject
member which i want to call ParentTable
in the child interface.
public interface IDbConstraint : IDbObject
{
// Hide IDbObject.ParentObject
IDbTable ParentTable
{
get;
}
.
.
.
}