Why do we use Abstract class

In one of my previous article I have described about why do we use interface in C#But in C# we have very important class known as abstract class. Abstract class can have one or more methods which can be abstract(only signature). But interface only contain the method signature. Then how is an abstract class different from an interface in C#. It is one of the favourite question in C# interview. What is abstract class and why do we use it?

You can learn more about virtual, override , new and abstract keywords here .


Continue reading

C# Property With Class Immutability

In this article I will discuss about the C# properties and how we can create immutable class in using C# property with code example. Further I will discuss evolution of properties from C# 1.0 to C# 6.0

Continue reading

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

Learning JavaScript – Classes and Properties with Examples

In my previous posts I have discussed about the datatypes, functions and this keyword in javascriptIn this article I will discuss about the anonymous type,  class, properties and how we can achieve encapsulation in JavaScript with code examples.

Continue reading

Aliases for Type and resolving external assembly collision

Type Aliases

There can be chances that we have two classes of same name residing in the same assembly or the different assemblies but we cannot  change the name of the classes due to design restrictions.

Continue reading