Advertisement
Guest User

Untitled

a guest
Aug 21st, 2014
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. public int MyMethod(int x)
  2. {
  3. try
  4. {
  5. return x + 8;
  6. }
  7. catch
  8. {
  9. throw;
  10. }
  11. }
  12.  
  13. public int MyMethod(int x)
  14. {
  15. return x + 8;
  16. }
  17.  
  18. .method public hidebysig instance int32 MyMethod(int32 x) cil managed
  19. {
  20. // Code size 4 (0x4)
  21. .maxstack 8
  22. IL_0000: ldarg.1
  23. IL_0001: ldc.i4.8
  24. IL_0002: add
  25. IL_0003: ret
  26. } // end of method MyClass::MyMethod
  27.  
  28. .method public hidebysig instance int32 MyMethod(int32 x) cil managed
  29. {
  30. // Code size 11 (0xb)
  31. .maxstack 2
  32. .locals init ([0] int32 CS$1$0000)
  33. .try
  34. {
  35. IL_0000: ldarg.1
  36. IL_0001: ldc.i4.8
  37. IL_0002: add
  38. IL_0003: stloc.0
  39. IL_0004: leave.s IL_0009
  40. } // end .try
  41. catch [mscorlib]System.Object
  42. {
  43. IL_0006: pop
  44. IL_0007: rethrow
  45. } // end handler
  46. IL_0009: ldloc.0
  47. IL_000a: ret
  48. } // end of method MyClass::MyMethod
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement