Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp3
  4. {
  5. public interface aaa { public void am(string s); }
  6. public interface bbb { public void bm(string s); }
  7. public interface ccc : aaa, bbb { public void cm(string s); }
  8. public class ddd : ccc
  9. {
  10. public void am(string s) { Console.WriteLine("am "+s); }
  11. public void bm(string s) { Console.WriteLine("bm " + s); }
  12. public void cm(string s) { Console.WriteLine("cm " + s); }
  13. public void dm(string s) { Console.WriteLine("dm " + s); }
  14. }
  15.  
  16. public class eee: ddd
  17. {
  18. public void em(string s) { Console.WriteLine("em " + s); }
  19. }
  20.  
  21. class Program
  22. {
  23. static void Main(string[] args)
  24. {
  25. ddd myDdd = new ddd();
  26. myDdd.am("book");
  27. myDdd.bm("house");
  28. myDdd.cm("duck");
  29. myDdd.dm("cat");
  30.  
  31. eee mYeee = new eee();
  32. //mYeee.
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement