what are the benefit of implementing Interface instead of Inherit the classes in .NET? except multiple inheritance
what are the benefit of implementing Interface instead of Inherit the classes in .NET?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
One key advantage of interfaces in a single inheritance language is that interfaces can be implemented on classes that do not share a common root.
Another point is that interfaces allow what is known as interface inheritance rather than implementation inheritance. This can sometimes be very useful but proponents of true multiple inheritance regard the lack of multiple implementation inheritance a crucial weakness of C#, Java etc.