.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Interfaces and multiple inheritance

Posted By: pooja     Posted Date: March 30, 2010    Points:2   Category :ASP.Net
Hi,

how C# cannot implement multiple inheritance without using Interfaces.

what is the reason behind it?

I want to know how interfaces rectifies it....

(i got the problem with with out interfaces is if two methods are having same name in two classes then if we inherit from those classes then it creates conflicts)

but if we have two methods in interface then what id the solution?

please explain me in detail with example

thanx

Responses
Author: Amit Mehra             
Posted Date: April 01, 2010     Points: 5   

Hi,

Multiple inheritance causes problems, if one or more of the parent classes defines members with same identifier. You would have to decide which parent to use to handle each method call, and the operation of class can be then very different than intended.

Please refer this discussion

http://social.msdn.microsoft.com/forums/en-US/csharplanguage/thread/01a995ea-9e06-4fa4-bdbb-682243f386a8

Thanks,
Amit
Please "Mark As Answer " if this post help you.


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend