Tag Archives: interface

Comparing C# types – IComparable or IComparer

How to make best of the interfaces provided by .NET framework for comparison types? In this article I will discuss why to use IComparable or IComparer interfaces. And why do we need to compare types in .NET at first place.Lets’s start checking all the aspects one by one by using C# examples.

Achieving Loose Coupling using Dependency Injection

In this article I will discuss about the tight coupling and loose coupling. Why loose coupling is a better way of programming? How to achieve loose coupling using dependency injection? How to achieve dependency injection using unity framework ? You should be able to answer all these questions after reading the article. All there topics… Read More »

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… Read More »

Why do we use C# interface?

Why do we use C# interface? In this article I would not cover anything about C# interface. I have already covered about existence of interface in C# and what are interfaces. As soon as we learn about C# interface, we think that it was very easy to understand about the interface and now at least I have understood… Read More »

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.… Read More »