ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

Why not support multiple inheritance in .Net ?

user-image
تم إضافة السؤال من قبل Jamil Akhtar , Senior Software engineer , Optimization Software Technology
تاريخ النشر: 2014/02/02
Rameez Ahmed Sayad
من قبل Rameez Ahmed Sayad , .Net Consultant , Proximus Luxembourg

To be honest , I don't even see a true need for object inheritance ( is a relationship ) , We can convert is a relation to 'has a' relation .  Multiple interfaces make much more sense to me which is present in c# .

amer safi
من قبل amer safi , Technical Team Leader( MCPD,MCTS) , LKD

To understand that you need to understand the Diamond problem first:The Diamond problem is an ambiguity that arises when two classes B and C inherit from Class 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?That is the reason why C# and Java languages does not support multiple inheritance.

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟