Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.
Link for csharp, asp.net, ado.net, dotnet basics, mvc and sql server video tutorial playlists
This question can be asked in different forms
1. Why would you use interfaces
2. An interface does not contain any implementation, only declarations. So what is the benefit of using an interface?
3. Why would you define an interface, have a class implement that interface and then access the class through the interface instead of just using the class directly.
The following are the advantages of programming against interfaces over programming against concrete classes.
1. Interfaces allow us to develop loosely coupled systems.
2. Interfaces are very useful for Dependency Injection.
3. Interfaces make unit testing and mocking easier.
We will discuss examples of each of these advantages in our upcoming videos.
0 Comments