Guest User

Untitled

a guest
Oct 18th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. GetData(int p1, string p2, object p3, bool p4 = false);
  2.  
  3. GetData(int p1, string p2, object p3, bool p4 = false, bool p5 = false);
  4.  
  5. GetData(int p1, string p2, object p3, bool p4 = false);
  6.  
  7. GetData(1, "p2", obj);
  8.  
  9. GetData(1, "p2", obj, false);
  10.  
  11. class Test
  12. {
  13. static void Main()
  14. {
  15. Foo(3);
  16. Foo();
  17. }
  18.  
  19. static void Foo(int x = 5)
  20. {
  21. }
  22. }
  23.  
  24. .method private hidebysig static void Main() cil managed
  25. {
  26. .entrypoint
  27. // Code size 16 (0x10)
  28. .maxstack 8
  29. IL_0000: nop
  30. IL_0001: ldc.i4.3
  31. IL_0002: call void Test::Foo(int32)
  32. IL_0007: nop
  33. IL_0008: ldc.i4.5
  34. IL_0009: call void Test::Foo(int32)
  35. IL_000e: nop
  36. IL_000f: ret
  37. } // end of method Test::Main
  38.  
  39. public void GetData(int p1, string p2, object p3, bool p4 = false, bool p5 = false)
  40. {
  41. //Do something
  42. }
  43.  
  44. public void GetData(int p1, string p2, object p3)
  45. {
  46. GetData(p1, p2, p3, false);
  47. }
  48.  
  49. public void GetData(int p1, string p2, object p3, bool p4)
  50. {
  51. GetData(p1, p2, p3, p4, false);
  52. }
  53.  
  54. public void GetData(int p1, string p2, object p3, bool p4, bool p5)
  55. {
  56. //Do something
  57. }
  58.  
  59. public void GetData(int p1, string p2, object p3)
  60. {
  61. GetData(p1, p2, p3, false);
  62. }
  63.  
  64. public void GetData(int p1, string p2, object p3)
  65. {
  66. GetData(p1, p2, p3, true);
  67. }
Add Comment
Please, Sign In to add comment