Should I include all the interfaces in the inheritance chain?

Viewed 98

If I have two interfaces:

    interface IGrandparent
    {
        void DoSomething();
    }

    interface IParent : IGrandparent
    {
        void DoSomethingElse();
    }

then there are two implementations:

//only includes last interface from the inheritance chain
public class Child1 : IParent 
{
    public void DoSomething()
    {
        throw new NotImplementedException();
    }

    public void DoSomethingElse()
    {
        throw new NotImplementedException();
    }
}

// includes all the interfaces from the inheritance chain    
public class Child2 : IGrandparent, IParent     
{
    public void DoSomething()
    {
        throw new NotImplementedException();
    }

    public void DoSomethingElse()
    {
        throw new NotImplementedException();
    }
}

Are these two implementations identical? (except the class name)? Some people say there are something to do with "implicit and explicit implementation", would some one explain why? I have seen Child2 style more than the other one.

2 Answers
Related