Advertisement
Guest User

Untitled

a guest
Jul 11th, 2019
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. namespace Problems
  2. {
  3. using System;
  4. internal class Program
  5. {
  6. class A
  7. {
  8. public virtual void F(int a)
  9. {
  10. Console.WriteLine("A.F(int)");
  11. }
  12. }
  13. class B : A
  14. {
  15. public void F(object a)
  16. {
  17. Console.WriteLine("B.F(object)");
  18. }
  19. public override void F(int a)
  20. {
  21. Console.WriteLine("B.F(int)");
  22. }
  23. }
  24. class C : B
  25. {
  26. public override void F(int a)
  27. {
  28. Console.WriteLine("C.F(int)");
  29. }
  30. public void F<T>(params T[] a)
  31. {
  32. Console.WriteLine("C.F(params T[]");
  33. }
  34. }
  35. public static void Main(string[] args)
  36. {
  37. new B().F(33);
  38. new C().F(33);
  39. }
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement