Hi Everyone,
Please let me know the solution of below question :
Q.4) why interface support multiple inheritance whereas classes are
not ? Cant we do explicit implementation in classes?
Thanks and Regards
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Santhosh Kumar JayaramanPosted Oct 22, 2012, 11:36 AM
Class A
{
void GetDetails()
{
//something
}
}
Class B
{
void GetDetails()
{
//something
}
}
Class C:A,B
{
void secondmethod()
{
}
}
Now if i create object of class C and call obj.GetDetails(), compiler dont know whether to go with class A method or Class B method.
But with interfaces there is no such confusion, because both methods dont ve implementations and only child class will have implementation