Answer Posted / om nama shivaya
C++ and C# both are object oriented programing languages
but C++ is having one draw back that can be rectified by C#
Draw back in C++ : Multiple Inheritance
Multiple Inheritance is having lot of draw backs .
Multiple Inheritance : Derived class which may contain more
than one base class.
the Draw back is Multiple base classes which are having
same method . so Derived class will get problem while
inheriting the base class methods.
Eaxmple for Multiple Inheritance : Let us consider 4 classes
A(Base class) having Method (MethA)
-----------------------------------------
| |
B(Sub Class)(Meth1) C(Sub Class)(Meth1)
-----------------------------------------
|
D(Derived class) having method(Meth1)
So B,C,D all are having same method (Meth1) with same
signature .now the Problem with Multiple Inheritance is
Their will be clash for class D to inherite base class
method (Meth1) from B and C class.
These problem is rectified in C# by providing solution :
Derived class should not contain morethan one base class
this can be achived by Multiple Interface
Multiple Interface :A class may Inherite one base class and
it can inherit multiple interfaces .
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the advantages of .net core?
Explain what is an interface and what is an abstract class? Please, expand by examples of using both. Explain why?
Is .net core the future?
Explain what is an application domain?
Explain what is an anonymous method and how is it different from a lambda expression?
Explain what is the difference between constants and read-only variables?
What are the improvements made in cas in .net 4.0?
How you apply a theme in whole application in .Net?
Explain the difference between the while and for loop.
Explain me what is the difference between a class and an object, and how do these terms relate to each other?
What are the properties of ADO.NET?
What is close method? How its different from finalize and dispose?
Explain what is heap and what is stack?
How does linq work?
What's singlecall activation mode used for in .net?