Learning JavaScript – Prototype and Inheritance

In my earlier article in this series of learning JavaScript I have discussed about the data types , functions, this keyword and properties and classesIn this article I will discuss about a very important concept of JavaScript known as prototype with code examples. After that I will discuss how we can use prototype to create inheritance in JavaScript.

Continue reading

Interface Example in C#

Interface in C#

Interface in C# has been introduced to implement multiple inheritance, which is not possible using the Classes. You can go through my article why .NET does not support Multiple inheritance. Using interfaces we can implement two or more interface contract to a single class which I will show with some interface example. I have said the word contract here as it is mandatory for the derived class to implement all the functions implemented by the interface.


Continue reading

Why C# doesn’t support multiple inheritance?

Why C# doesn’t support multiple inheritance?

I have started writing my new blog about the Interfaces in C#. But as soon as we read about interfaces, the first thing everyone mentions is that C# does not support multiple inheritance(MI) rather it supports MI but in its downgraded version viz. MI is supported in .NET framework using interfaces which I would discuss in my next blog. Why C# doesn’t support multiple inheritance ? I thought let’s first write about the logic behind not supporting MI in .NET using classes.

Multiple inheritance is form of inheritance where two or more classes are inherited by the derived class

Continue reading