Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


why .net does not support multiple inheritance?

Answers were Sorted based on User's Feedback



why .net does not support multiple inheritance?..

Answer / satish kumar k

In object-oriented programming languages with multiple
inheritance and knowledge organization, the diamond problem
is an ambiguity that arises when two classes B and C inherit
from A, and class D inherits from both B and C. If a method
in D calls a method defined in A (and does not override the
method), and B and C have overridden that method
differently, then from which class does it inherit: B, or C?
For example, in the context of GUI software development, a
class Button may inherit from both classes Rectangle (for
appearance) and MouseEvent (for functionality), and classes
Rectangle and MouseEvent both inherit from the Object class.
Now if the equals method is called for a Button object and
there is no such method in the Button class but there is an
over-ridden equals method in both Rectangle and MouseEvent,
which method should be eventually called?

Is This Answer Correct ?    7 Yes 1 No

why .net does not support multiple inheritance?..

Answer / satish kumar k

Languages that only allow single inheritance (such as Ada,
Objective-C, PHP, C#, Delphi/Free Pascal and Java) allow the
multiple inheritance of interfaces (called protocols in
Objective-C). Interfaces are essentially abstract base
classes with all abstract methods and no data members. The
problem is therefore avoided since there is always only one
implementation of a specific method or property and no
ambiguity arises

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More Dot Net General Interview Questions

Explain when should you use .net web forms over asp.net mvc?

0 Answers  


What does cil do?

0 Answers  


Who is using .net core?

0 Answers  


What is Entity Relationship Model in .NET?

0 Answers   Viscus Infotech,


Please explain the difference between constants and read-only variables?

0 Answers  


What are the Characteristics of .NET?

1 Answers  


What's the .net collection class that allows an element to be accessed using a unique key?

0 Answers  


Which property is used in the email to send the content as HTML

1 Answers  


What is Global Assembly Cache (GAC) and what is the Purpose of it?

1 Answers  


i have an array of 10 objects whose values are from 1-10 randomly inserted. i have deleted one array object. tell me what is that value? write the logic of it.

2 Answers   Deloitte, Srp Khanij,


How will u load dynamic assembly? How will create assemblies at run time?

1 Answers  


What are the namespace available in .net?

0 Answers  


Categories