You have used millions of times, but you maybe don’t know what they call it (I just saw it and I didn't know too). Suppose these two interfaces with a member Called WithDraw():
1 2 3 4 5 6 7 8 9 | public interface IBankingA { void WithDraw(); } public interface IBankingB { void WithDraw(); } |
Now If you want to implement the members of these two interfaces in a class, you should tell the compiler that I'm implementing the members of both interfaces as they have the same name by typing the interface name before the method name like this:
1 2 3 4 5 6 7 8 9 10 11 12 | public class Baking :IBankingA, IBankingB { void IBankingA.WithDraw() { throw new NotImplementedException(); } void IBankingB.WithDraw() { throw new NotImplementedException(); } } |
That's it!