From 8e5e3a7db08c668fa195f69c01a2ec83789f8a1e Mon Sep 17 00:00:00 2001 From: Max Dionysius Date: Sat, 17 Nov 2018 23:37:20 +0100 Subject: [PATCH] Added a second implementation (#21944) So it will highlight, that an interface can have multiple implementations (which differs) at the same time --- guide/english/csharp/interface/index.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/guide/english/csharp/interface/index.md b/guide/english/csharp/interface/index.md index 87739a1f76..a792a77263 100644 --- a/guide/english/csharp/interface/index.md +++ b/guide/english/csharp/interface/index.md @@ -55,3 +55,21 @@ public class UserHungry : IUserFavoriteFood } } ``` + +Every implementation can be different: +```csharp +public class AnotherUserHungry : IUserFavoriteFood +{ + public AddFood() + { + // DIFFERENT Implementation: + // A method to add vegan food. + } + + public Task EatFavoriteFood(int id) + { + // DIFFERENT Implementation: + // A method to Eat only vegan food by id. + } +} +```