From 7498ce0052f9e635fede7d6a62f6f1966199609e Mon Sep 17 00:00:00 2001 From: Anirban Ghatak Date: Sat, 1 Dec 2018 21:30:11 -0500 Subject: [PATCH] Added a few lines to emphasize Interfaces importance to Design patterns. (#23700) * Added a few lines to emphasize Interfaces importance to Design patterns. * Fixed several grammatical mistakes --- guide/english/csharp/interface/index.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/guide/english/csharp/interface/index.md b/guide/english/csharp/interface/index.md index a792a77263..76da929621 100644 --- a/guide/english/csharp/interface/index.md +++ b/guide/english/csharp/interface/index.md @@ -26,8 +26,9 @@ An Interface can not : * Be instantiated. --- -Using interfaces allows us to change our implementation in our project without breaking other parts, -and only have to change the one place where the object is created. +Using interfaces allows us to change our implementation in our project without breaking other parts, and only have to change the one place where the object is created. + +As interfaces do not implement any logic by themselves, they are a great tool for programmers to program against a type rather than a concrete object. This is very useful in keeping code loosely coupled. This behavior of interfaces made them imperative for implementation of Design Patterns. Interface Example: ```csharp @@ -38,6 +39,7 @@ public Interface IUserFavoriteFood } ``` --- + Interface inheritance and implementation: ```csharp public class UserHungry : IUserFavoriteFood