You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1313 lines
42 KiB

  1. // Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
  2. // Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.
  3. // Metadata version: v4.0.30319
  4. .assembly extern mscorlib
  5. {
  6. .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
  7. .ver 4:0:0:0
  8. }
  9. .assembly Switch
  10. {
  11. .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
  12. .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
  13. 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
  14. // --- The following custom attribute is added automatically, do not uncomment -------
  15. // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 )
  16. .permissionset reqmin
  17. = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}}
  18. .hash algorithm 0x00008004
  19. .ver 0:0:0:0
  20. }
  21. .module Switch.dll
  22. // MVID: {F38BF1C4-C0E5-4BAD-8838-849DFFFA97DF}
  23. .custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
  24. .imagebase 0x10000000
  25. .file alignment 0x00000200
  26. .stackreserve 0x00100000
  27. .subsystem 0x0003 // WINDOWS_CUI
  28. .corflags 0x00000001 // ILONLY
  29. // Image base: 0x00300000
  30. // =============== CLASS MEMBERS DECLARATION ===================
  31. .class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch
  32. extends [mscorlib]System.Object
  33. {
  34. .class auto ansi nested public beforefieldinit SetProperty
  35. extends [mscorlib]System.Object
  36. {
  37. .field public initonly class [mscorlib]System.Reflection.PropertyInfo Property
  38. .field private int32 '<Set>k__BackingField'
  39. .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
  40. .method public hidebysig specialname
  41. instance int32 get_Set() cil managed
  42. {
  43. .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
  44. // Code size 7 (0x7)
  45. .maxstack 8
  46. IL_0000: ldarg.0
  47. IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty::'<Set>k__BackingField'
  48. IL_0006: ret
  49. } // end of method SetProperty::get_Set
  50. .method public hidebysig specialname
  51. instance void set_Set(int32 'value') cil managed
  52. {
  53. .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
  54. // Code size 8 (0x8)
  55. .maxstack 8
  56. IL_0000: ldarg.0
  57. IL_0001: ldarg.1
  58. IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty::'<Set>k__BackingField'
  59. IL_0007: ret
  60. } // end of method SetProperty::set_Set
  61. .method public hidebysig specialname rtspecialname
  62. instance void .ctor(class [mscorlib]System.Reflection.PropertyInfo 'property') cil managed
  63. {
  64. // Code size 14 (0xe)
  65. .maxstack 8
  66. IL_0000: ldarg.0
  67. IL_0001: call instance void [mscorlib]System.Object::.ctor()
  68. IL_0006: ldarg.0
  69. IL_0007: ldarg.1
  70. IL_0008: stfld class [mscorlib]System.Reflection.PropertyInfo ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty::Property
  71. IL_000d: ret
  72. } // end of method SetProperty::.ctor
  73. .property instance int32 Set()
  74. {
  75. .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty::get_Set()
  76. .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty::set_Set(int32)
  77. } // end of property SetProperty::Set
  78. } // end of class SetProperty
  79. .method public hidebysig static string
  80. SparseIntegerSwitch(int32 i) cil managed
  81. {
  82. // Code size 185 (0xb9)
  83. .maxstack 2
  84. IL_0000: ldstr "SparseIntegerSwitch: "
  85. IL_0005: ldarg.0
  86. IL_0006: box [mscorlib]System.Int32
  87. IL_000b: call string [mscorlib]System.String::Concat(object,
  88. object)
  89. IL_0010: call void [mscorlib]System.Console::WriteLine(string)
  90. IL_0015: ldarg.0
  91. IL_0016: ldc.i4.4
  92. IL_0017: bgt.s IL_0048
  93. IL_0019: ldarg.0
  94. IL_001a: ldc.i4 0xff676980
  95. IL_001f: beq.s IL_0071
  96. IL_0021: ldarg.0
  97. IL_0022: ldc.i4.s -100
  98. IL_0024: beq.s IL_0077
  99. IL_0026: ldarg.0
  100. IL_0027: ldc.i4.m1
  101. IL_0028: sub
  102. IL_0029: switch (
  103. IL_007d,
  104. IL_0083,
  105. IL_0089,
  106. IL_008f,
  107. IL_00b3,
  108. IL_0095)
  109. IL_0046: br.s IL_00b3
  110. IL_0048: ldarg.0
  111. IL_0049: ldc.i4 0x2710
  112. IL_004e: bgt.s IL_005f
  113. IL_0050: ldarg.0
  114. IL_0051: ldc.i4.s 100
  115. IL_0053: beq.s IL_009b
  116. IL_0055: ldarg.0
  117. IL_0056: ldc.i4 0x2710
  118. IL_005b: beq.s IL_00a1
  119. IL_005d: br.s IL_00b3
  120. IL_005f: ldarg.0
  121. IL_0060: ldc.i4 0x2711
  122. IL_0065: beq.s IL_00a7
  123. IL_0067: ldarg.0
  124. IL_0068: ldc.i4 0x7fffffff
  125. IL_006d: beq.s IL_00ad
  126. IL_006f: br.s IL_00b3
  127. IL_0071: ldstr "-10 mln"
  128. IL_0076: ret
  129. IL_0077: ldstr "-hundred"
  130. IL_007c: ret
  131. IL_007d: ldstr "-1"
  132. IL_0082: ret
  133. IL_0083: ldstr "0"
  134. IL_0088: ret
  135. IL_0089: ldstr "1"
  136. IL_008e: ret
  137. IL_008f: ldstr "2"
  138. IL_0094: ret
  139. IL_0095: ldstr "4"
  140. IL_009a: ret
  141. IL_009b: ldstr "hundred"
  142. IL_00a0: ret
  143. IL_00a1: ldstr "ten thousand"
  144. IL_00a6: ret
  145. IL_00a7: ldstr "ten thousand and one"
  146. IL_00ac: ret
  147. IL_00ad: ldstr "int.MaxValue"
  148. IL_00b2: ret
  149. IL_00b3: ldstr "something else"
  150. IL_00b8: ret
  151. } // end of method Switch::SparseIntegerSwitch
  152. .method public hidebysig static string
  153. SwitchOverNullableInt(valuetype [mscorlib]System.Nullable`1<int32> i) cil managed
  154. {
  155. // Code size 63 (0x3f)
  156. .maxstack 2
  157. .locals init (valuetype [mscorlib]System.Nullable`1<int32> V_0,
  158. int32 V_1)
  159. IL_0000: ldarg.0
  160. IL_0001: stloc.0
  161. IL_0002: ldloca.s V_0
  162. IL_0004: call instance bool valuetype [mscorlib]System.Nullable`1<int32>::get_HasValue()
  163. IL_0009: brfalse.s IL_0021
  164. IL_000b: ldloca.s V_0
  165. IL_000d: call instance !0 valuetype [mscorlib]System.Nullable`1<int32>::GetValueOrDefault()
  166. IL_0012: stloc.1
  167. IL_0013: ldloc.1
  168. IL_0014: brfalse.s IL_0027
  169. IL_0016: ldloc.1
  170. IL_0017: ldc.i4.5
  171. IL_0018: beq.s IL_002d
  172. IL_001a: ldloc.1
  173. IL_001b: ldc.i4.s 10
  174. IL_001d: beq.s IL_0033
  175. IL_001f: br.s IL_0039
  176. IL_0021: ldstr "null"
  177. IL_0026: ret
  178. IL_0027: ldstr "zero"
  179. IL_002c: ret
  180. IL_002d: ldstr "five"
  181. IL_0032: ret
  182. IL_0033: ldstr "ten"
  183. IL_0038: ret
  184. IL_0039: ldstr "large"
  185. IL_003e: ret
  186. } // end of method Switch::SwitchOverNullableInt
  187. .method public hidebysig static string
  188. SwitchOverNullableIntShifted(valuetype [mscorlib]System.Nullable`1<int32> i) cil managed
  189. {
  190. // Code size 98 (0x62)
  191. .maxstack 2
  192. .locals init (valuetype [mscorlib]System.Nullable`1<int32> V_0,
  193. valuetype [mscorlib]System.Nullable`1<int32> V_1,
  194. valuetype [mscorlib]System.Nullable`1<int32> V_2,
  195. int32 V_3)
  196. IL_0000: ldarg.0
  197. IL_0001: stloc.1
  198. IL_0002: ldloca.s V_1
  199. IL_0004: call instance bool valuetype [mscorlib]System.Nullable`1<int32>::get_HasValue()
  200. IL_0009: brtrue.s IL_0016
  201. IL_000b: ldloca.s V_2
  202. IL_000d: initobj valuetype [mscorlib]System.Nullable`1<int32>
  203. IL_0013: ldloc.2
  204. IL_0014: br.s IL_0024
  205. IL_0016: ldloca.s V_1
  206. IL_0018: call instance !0 valuetype [mscorlib]System.Nullable`1<int32>::GetValueOrDefault()
  207. IL_001d: ldc.i4.5
  208. IL_001e: add
  209. IL_001f: newobj instance void valuetype [mscorlib]System.Nullable`1<int32>::.ctor(!0)
  210. IL_0024: stloc.0
  211. IL_0025: ldloca.s V_0
  212. IL_0027: call instance bool valuetype [mscorlib]System.Nullable`1<int32>::get_HasValue()
  213. IL_002c: brfalse.s IL_0044
  214. IL_002e: ldloca.s V_0
  215. IL_0030: call instance !0 valuetype [mscorlib]System.Nullable`1<int32>::GetValueOrDefault()
  216. IL_0035: stloc.3
  217. IL_0036: ldloc.3
  218. IL_0037: brfalse.s IL_004a
  219. IL_0039: ldloc.3
  220. IL_003a: ldc.i4.5
  221. IL_003b: beq.s IL_0050
  222. IL_003d: ldloc.3
  223. IL_003e: ldc.i4.s 10
  224. IL_0040: beq.s IL_0056
  225. IL_0042: br.s IL_005c
  226. IL_0044: ldstr "null"
  227. IL_0049: ret
  228. IL_004a: ldstr "zero"
  229. IL_004f: ret
  230. IL_0050: ldstr "five"
  231. IL_0055: ret
  232. IL_0056: ldstr "ten"
  233. IL_005b: ret
  234. IL_005c: ldstr "large"
  235. IL_0061: ret
  236. } // end of method Switch::SwitchOverNullableIntShifted
  237. .method public hidebysig static string
  238. SwitchOverNullableIntNoNullCase(valuetype [mscorlib]System.Nullable`1<int32> i) cil managed
  239. {
  240. // Code size 57 (0x39)
  241. .maxstack 2
  242. .locals init (valuetype [mscorlib]System.Nullable`1<int32> V_0,
  243. int32 V_1)
  244. IL_0000: ldarg.0
  245. IL_0001: stloc.0
  246. IL_0002: ldloca.s V_0
  247. IL_0004: call instance bool valuetype [mscorlib]System.Nullable`1<int32>::get_HasValue()
  248. IL_0009: brfalse.s IL_0033
  249. IL_000b: ldloca.s V_0
  250. IL_000d: call instance !0 valuetype [mscorlib]System.Nullable`1<int32>::GetValueOrDefault()
  251. IL_0012: stloc.1
  252. IL_0013: ldloc.1
  253. IL_0014: brfalse.s IL_0021
  254. IL_0016: ldloc.1
  255. IL_0017: ldc.i4.5
  256. IL_0018: beq.s IL_0027
  257. IL_001a: ldloc.1
  258. IL_001b: ldc.i4.s 10
  259. IL_001d: beq.s IL_002d
  260. IL_001f: br.s IL_0033
  261. IL_0021: ldstr "zero"
  262. IL_0026: ret
  263. IL_0027: ldstr "five"
  264. IL_002c: ret
  265. IL_002d: ldstr "ten"
  266. IL_0032: ret
  267. IL_0033: ldstr "other"
  268. IL_0038: ret
  269. } // end of method Switch::SwitchOverNullableIntNoNullCase
  270. .method public hidebysig static string
  271. SwitchOverNullableIntNoNullCaseShifted(valuetype [mscorlib]System.Nullable`1<int32> i) cil managed
  272. {
  273. // Code size 92 (0x5c)
  274. .maxstack 2
  275. .locals init (valuetype [mscorlib]System.Nullable`1<int32> V_0,
  276. valuetype [mscorlib]System.Nullable`1<int32> V_1,
  277. valuetype [mscorlib]System.Nullable`1<int32> V_2,
  278. int32 V_3)
  279. IL_0000: ldarg.0
  280. IL_0001: stloc.1
  281. IL_0002: ldloca.s V_1
  282. IL_0004: call instance bool valuetype [mscorlib]System.Nullable`1<int32>::get_HasValue()
  283. IL_0009: brtrue.s IL_0016
  284. IL_000b: ldloca.s V_2
  285. IL_000d: initobj valuetype [mscorlib]System.Nullable`1<int32>
  286. IL_0013: ldloc.2
  287. IL_0014: br.s IL_0024
  288. IL_0016: ldloca.s V_1
  289. IL_0018: call instance !0 valuetype [mscorlib]System.Nullable`1<int32>::GetValueOrDefault()
  290. IL_001d: ldc.i4.5
  291. IL_001e: add
  292. IL_001f: newobj instance void valuetype [mscorlib]System.Nullable`1<int32>::.ctor(!0)
  293. IL_0024: stloc.0
  294. IL_0025: ldloca.s V_0
  295. IL_0027: call instance bool valuetype [mscorlib]System.Nullable`1<int32>::get_HasValue()
  296. IL_002c: brfalse.s IL_0056
  297. IL_002e: ldloca.s V_0
  298. IL_0030: call instance !0 valuetype [mscorlib]System.Nullable`1<int32>::GetValueOrDefault()
  299. IL_0035: stloc.3
  300. IL_0036: ldloc.3
  301. IL_0037: brfalse.s IL_0044
  302. IL_0039: ldloc.3
  303. IL_003a: ldc.i4.5
  304. IL_003b: beq.s IL_004a
  305. IL_003d: ldloc.3
  306. IL_003e: ldc.i4.s 10
  307. IL_0040: beq.s IL_0050
  308. IL_0042: br.s IL_0056
  309. IL_0044: ldstr "zero"
  310. IL_0049: ret
  311. IL_004a: ldstr "five"
  312. IL_004f: ret
  313. IL_0050: ldstr "ten"
  314. IL_0055: ret
  315. IL_0056: ldstr "other"
  316. IL_005b: ret
  317. } // end of method Switch::SwitchOverNullableIntNoNullCaseShifted
  318. .method public hidebysig static void SwitchOverInt(int32 i) cil managed
  319. {
  320. // Code size 122 (0x7a)
  321. .maxstack 2
  322. IL_0000: ldarg.0
  323. IL_0001: ldc.i4.s 10
  324. IL_0003: bgt.s IL_0012
  325. IL_0005: ldarg.0
  326. IL_0006: brfalse.s IL_002d
  327. IL_0008: ldarg.0
  328. IL_0009: ldc.i4.5
  329. IL_000a: beq.s IL_0038
  330. IL_000c: ldarg.0
  331. IL_000d: ldc.i4.s 10
  332. IL_000f: beq.s IL_0043
  333. IL_0011: ret
  334. IL_0012: ldarg.0
  335. IL_0013: ldc.i4.s 20
  336. IL_0015: bgt.s IL_0022
  337. IL_0017: ldarg.0
  338. IL_0018: ldc.i4.s 15
  339. IL_001a: beq.s IL_004e
  340. IL_001c: ldarg.0
  341. IL_001d: ldc.i4.s 20
  342. IL_001f: beq.s IL_0059
  343. IL_0021: ret
  344. IL_0022: ldarg.0
  345. IL_0023: ldc.i4.s 25
  346. IL_0025: beq.s IL_0064
  347. IL_0027: ldarg.0
  348. IL_0028: ldc.i4.s 30
  349. IL_002a: beq.s IL_006f
  350. IL_002c: ret
  351. IL_002d: ldstr "zero"
  352. IL_0032: call void [mscorlib]System.Console::WriteLine(string)
  353. IL_0037: ret
  354. IL_0038: ldstr "five"
  355. IL_003d: call void [mscorlib]System.Console::WriteLine(string)
  356. IL_0042: ret
  357. IL_0043: ldstr "ten"
  358. IL_0048: call void [mscorlib]System.Console::WriteLine(string)
  359. IL_004d: ret
  360. IL_004e: ldstr "fifteen"
  361. IL_0053: call void [mscorlib]System.Console::WriteLine(string)
  362. IL_0058: ret
  363. IL_0059: ldstr "twenty"
  364. IL_005e: call void [mscorlib]System.Console::WriteLine(string)
  365. IL_0063: ret
  366. IL_0064: ldstr "twenty-five"
  367. IL_0069: call void [mscorlib]System.Console::WriteLine(string)
  368. IL_006e: ret
  369. IL_006f: ldstr "thirty"
  370. IL_0074: call void [mscorlib]System.Console::WriteLine(string)
  371. IL_0079: ret
  372. } // end of method Switch::SwitchOverInt
  373. .method public hidebysig static string
  374. ShortSwitchOverString(string text) cil managed
  375. {
  376. // Code size 81 (0x51)
  377. .maxstack 2
  378. IL_0000: ldstr "ShortSwitchOverString: "
  379. IL_0005: ldarg.0
  380. IL_0006: call string [mscorlib]System.String::Concat(string,
  381. string)
  382. IL_000b: call void [mscorlib]System.Console::WriteLine(string)
  383. IL_0010: ldarg.0
  384. IL_0011: ldstr "First case"
  385. IL_0016: call bool [mscorlib]System.String::op_Equality(string,
  386. string)
  387. IL_001b: brtrue.s IL_0039
  388. IL_001d: ldarg.0
  389. IL_001e: ldstr "Second case"
  390. IL_0023: call bool [mscorlib]System.String::op_Equality(string,
  391. string)
  392. IL_0028: brtrue.s IL_003f
  393. IL_002a: ldarg.0
  394. IL_002b: ldstr "Third case"
  395. IL_0030: call bool [mscorlib]System.String::op_Equality(string,
  396. string)
  397. IL_0035: brtrue.s IL_0045
  398. IL_0037: br.s IL_004b
  399. IL_0039: ldstr "Text1"
  400. IL_003e: ret
  401. IL_003f: ldstr "Text2"
  402. IL_0044: ret
  403. IL_0045: ldstr "Text3"
  404. IL_004a: ret
  405. IL_004b: ldstr "Default"
  406. IL_0050: ret
  407. } // end of method Switch::ShortSwitchOverString
  408. .method public hidebysig static string
  409. ShortSwitchOverStringWithNullCase(string text) cil managed
  410. {
  411. // Code size 71 (0x47)
  412. .maxstack 2
  413. IL_0000: ldstr "ShortSwitchOverStringWithNullCase: "
  414. IL_0005: ldarg.0
  415. IL_0006: call string [mscorlib]System.String::Concat(string,
  416. string)
  417. IL_000b: call void [mscorlib]System.Console::WriteLine(string)
  418. IL_0010: ldarg.0
  419. IL_0011: ldstr "First case"
  420. IL_0016: call bool [mscorlib]System.String::op_Equality(string,
  421. string)
  422. IL_001b: brtrue.s IL_002f
  423. IL_001d: ldarg.0
  424. IL_001e: ldstr "Second case"
  425. IL_0023: call bool [mscorlib]System.String::op_Equality(string,
  426. string)
  427. IL_0028: brtrue.s IL_0035
  428. IL_002a: ldarg.0
  429. IL_002b: brfalse.s IL_003b
  430. IL_002d: br.s IL_0041
  431. IL_002f: ldstr "Text1"
  432. IL_0034: ret
  433. IL_0035: ldstr "Text2"
  434. IL_003a: ret
  435. IL_003b: ldstr "null"
  436. IL_0040: ret
  437. IL_0041: ldstr "Default"
  438. IL_0046: ret
  439. } // end of method Switch::ShortSwitchOverStringWithNullCase
  440. .method public hidebysig static string
  441. SwitchOverString1(string text) cil managed
  442. {
  443. // Code size 289 (0x121)
  444. .maxstack 2
  445. .locals init (uint32 V_0)
  446. IL_0000: ldstr "SwitchOverString1: "
  447. IL_0005: ldarg.0
  448. IL_0006: call string [mscorlib]System.String::Concat(string,
  449. string)
  450. IL_000b: call void [mscorlib]System.Console::WriteLine(string)
  451. IL_0010: ldarg.0
  452. IL_0011: call uint32 '<PrivateImplementationDetails>'::ComputeStringHash(string)
  453. IL_0016: stloc.0
  454. IL_0017: ldloc.0
  455. IL_0018: ldc.i4 0xf3d44a6
  456. IL_001d: bgt.un.s IL_0052
  457. IL_001f: ldloc.0
  458. IL_0020: ldc.i4 0x8861b86
  459. IL_0025: bgt.un.s IL_003d
  460. IL_0027: ldloc.0
  461. IL_0028: brfalse IL_00f0
  462. IL_002d: ldloc.0
  463. IL_002e: ldc.i4 0x8861b86
  464. IL_0033: beq IL_00d2
  465. IL_0038: br IL_011b
  466. IL_003d: ldloc.0
  467. IL_003e: ldc.i4 0xc9a8f4f
  468. IL_0043: beq.s IL_0084
  469. IL_0045: ldloc.0
  470. IL_0046: ldc.i4 0xf3d44a6
  471. IL_004b: beq.s IL_00b4
  472. IL_004d: br IL_011b
  473. IL_0052: ldloc.0
  474. IL_0053: ldc.i4 0x652a1179
  475. IL_0058: bgt.un.s IL_006f
  476. IL_005a: ldloc.0
  477. IL_005b: ldc.i4 0x51650fb9
  478. IL_0060: beq.s IL_00e1
  479. IL_0062: ldloc.0
  480. IL_0063: ldc.i4 0x652a1179
  481. IL_0068: beq.s IL_00a5
  482. IL_006a: br IL_011b
  483. IL_006f: ldloc.0
  484. IL_0070: ldc.i4 0xea3d096b
  485. IL_0075: beq.s IL_0096
  486. IL_0077: ldloc.0
  487. IL_0078: ldc.i4 0xf701cc7f
  488. IL_007d: beq.s IL_00c3
  489. IL_007f: br IL_011b
  490. IL_0084: ldarg.0
  491. IL_0085: ldstr "First case"
  492. IL_008a: call bool [mscorlib]System.String::op_Equality(string,
  493. string)
  494. IL_008f: brtrue.s IL_00f5
  495. IL_0091: br IL_011b
  496. IL_0096: ldarg.0
  497. IL_0097: ldstr "Second case"
  498. IL_009c: call bool [mscorlib]System.String::op_Equality(string,
  499. string)
  500. IL_00a1: brtrue.s IL_00fb
  501. IL_00a3: br.s IL_011b
  502. IL_00a5: ldarg.0
  503. IL_00a6: ldstr "2nd case"
  504. IL_00ab: call bool [mscorlib]System.String::op_Equality(string,
  505. string)
  506. IL_00b0: brtrue.s IL_00fb
  507. IL_00b2: br.s IL_011b
  508. IL_00b4: ldarg.0
  509. IL_00b5: ldstr "Third case"
  510. IL_00ba: call bool [mscorlib]System.String::op_Equality(string,
  511. string)
  512. IL_00bf: brtrue.s IL_0101
  513. IL_00c1: br.s IL_011b
  514. IL_00c3: ldarg.0
  515. IL_00c4: ldstr "Fourth case"
  516. IL_00c9: call bool [mscorlib]System.String::op_Equality(string,
  517. string)
  518. IL_00ce: brtrue.s IL_0107
  519. IL_00d0: br.s IL_011b
  520. IL_00d2: ldarg.0
  521. IL_00d3: ldstr "Fifth case"
  522. IL_00d8: call bool [mscorlib]System.String::op_Equality(string,
  523. string)
  524. IL_00dd: brtrue.s IL_010d
  525. IL_00df: br.s IL_011b
  526. IL_00e1: ldarg.0
  527. IL_00e2: ldstr "Sixth case"
  528. IL_00e7: call bool [mscorlib]System.String::op_Equality(string,
  529. string)
  530. IL_00ec: brtrue.s IL_0113
  531. IL_00ee: br.s IL_011b
  532. IL_00f0: ldarg.0
  533. IL_00f1: brfalse.s IL_0119
  534. IL_00f3: br.s IL_011b
  535. IL_00f5: ldstr "Text1"
  536. IL_00fa: ret
  537. IL_00fb: ldstr "Text2"
  538. IL_0100: ret
  539. IL_0101: ldstr "Text3"
  540. IL_0106: ret
  541. IL_0107: ldstr "Text4"
  542. IL_010c: ret
  543. IL_010d: ldstr "Text5"
  544. IL_0112: ret
  545. IL_0113: ldstr "Text6"
  546. IL_0118: ret
  547. IL_0119: ldnull
  548. IL_011a: ret
  549. IL_011b: ldstr "Default"
  550. IL_0120: ret
  551. } // end of method Switch::SwitchOverString1
  552. .method public hidebysig static string
  553. SwitchOverString2() cil managed
  554. {
  555. // Code size 446 (0x1be)
  556. .maxstack 2
  557. .locals init (string V_0,
  558. uint32 V_1)
  559. IL_0000: ldstr "SwitchOverString2:"
  560. IL_0005: call void [mscorlib]System.Console::WriteLine(string)
  561. IL_000a: call string [mscorlib]System.Environment::get_UserName()
  562. IL_000f: stloc.0
  563. IL_0010: ldloc.0
  564. IL_0011: call uint32 '<PrivateImplementationDetails>'::ComputeStringHash(string)
  565. IL_0016: stloc.1
  566. IL_0017: ldloc.1
  567. IL_0018: ldc.i4 0x4c7c71f6
  568. IL_001d: bgt.un.s IL_0065
  569. IL_001f: ldloc.1
  570. IL_0020: ldc.i4 0xc9a8f4f
  571. IL_0025: bgt.un.s IL_003f
  572. IL_0027: ldloc.1
  573. IL_0028: ldc.i4 0x8861b86
  574. IL_002d: beq IL_0107
  575. IL_0032: ldloc.1
  576. IL_0033: ldc.i4 0xc9a8f4f
  577. IL_0038: beq.s IL_00b3
  578. IL_003a: br IL_01b8
  579. IL_003f: ldloc.1
  580. IL_0040: ldc.i4 0xf3d44a6
  581. IL_0045: beq IL_00dd
  582. IL_004a: ldloc.1
  583. IL_004b: ldc.i4 0x20289804
  584. IL_0050: beq IL_013a
  585. IL_0055: ldloc.1
  586. IL_0056: ldc.i4 0x4c7c71f6
  587. IL_005b: beq IL_0149
  588. IL_0060: br IL_01b8
  589. IL_0065: ldloc.1
  590. IL_0066: ldc.i4 0xa151b28a
  591. IL_006b: bgt.un.s IL_0093
  592. IL_006d: ldloc.1
  593. IL_006e: ldc.i4 0x4d0cea48
  594. IL_0073: beq IL_0167
  595. IL_0078: ldloc.1
  596. IL_0079: ldc.i4 0x51650fb9
  597. IL_007e: beq IL_0119
  598. IL_0083: ldloc.1
  599. IL_0084: ldc.i4 0xa151b28a
  600. IL_0089: beq IL_012b
  601. IL_008e: br IL_01b8
  602. IL_0093: ldloc.1
  603. IL_0094: ldc.i4 0xea3d096b
  604. IL_0099: beq.s IL_00c8
  605. IL_009b: ldloc.1
  606. IL_009c: ldc.i4 0xed5134d4
  607. IL_00a1: beq IL_0158
  608. IL_00a6: ldloc.1
  609. IL_00a7: ldc.i4 0xf701cc7f
  610. IL_00ac: beq.s IL_00f2
  611. IL_00ae: br IL_01b8
  612. IL_00b3: ldloc.0
  613. IL_00b4: ldstr "First case"
  614. IL_00b9: call bool [mscorlib]System.String::op_Equality(string,
  615. string)
  616. IL_00be: brtrue IL_0176
  617. IL_00c3: br IL_01b8
  618. IL_00c8: ldloc.0
  619. IL_00c9: ldstr "Second case"
  620. IL_00ce: call bool [mscorlib]System.String::op_Equality(string,
  621. string)
  622. IL_00d3: brtrue IL_017c
  623. IL_00d8: br IL_01b8
  624. IL_00dd: ldloc.0
  625. IL_00de: ldstr "Third case"
  626. IL_00e3: call bool [mscorlib]System.String::op_Equality(string,
  627. string)
  628. IL_00e8: brtrue IL_0182
  629. IL_00ed: br IL_01b8
  630. IL_00f2: ldloc.0
  631. IL_00f3: ldstr "Fourth case"
  632. IL_00f8: call bool [mscorlib]System.String::op_Equality(string,
  633. string)
  634. IL_00fd: brtrue IL_0188
  635. IL_0102: br IL_01b8
  636. IL_0107: ldloc.0
  637. IL_0108: ldstr "Fifth case"
  638. IL_010d: call bool [mscorlib]System.String::op_Equality(string,
  639. string)
  640. IL_0112: brtrue.s IL_018e
  641. IL_0114: br IL_01b8
  642. IL_0119: ldloc.0
  643. IL_011a: ldstr "Sixth case"
  644. IL_011f: call bool [mscorlib]System.String::op_Equality(string,
  645. string)
  646. IL_0124: brtrue.s IL_0194
  647. IL_0126: br IL_01b8
  648. IL_012b: ldloc.0
  649. IL_012c: ldstr "Seventh case"
  650. IL_0131: call bool [mscorlib]System.String::op_Equality(string,
  651. string)
  652. IL_0136: brtrue.s IL_019a
  653. IL_0138: br.s IL_01b8
  654. IL_013a: ldloc.0
  655. IL_013b: ldstr "Eighth case"
  656. IL_0140: call bool [mscorlib]System.String::op_Equality(string,
  657. string)
  658. IL_0145: brtrue.s IL_01a0
  659. IL_0147: br.s IL_01b8
  660. IL_0149: ldloc.0
  661. IL_014a: ldstr "Ninth case"
  662. IL_014f: call bool [mscorlib]System.String::op_Equality(string,
  663. string)
  664. IL_0154: brtrue.s IL_01a6
  665. IL_0156: br.s IL_01b8
  666. IL_0158: ldloc.0
  667. IL_0159: ldstr "Tenth case"
  668. IL_015e: call bool [mscorlib]System.String::op_Equality(string,
  669. string)
  670. IL_0163: brtrue.s IL_01ac
  671. IL_0165: br.s IL_01b8
  672. IL_0167: ldloc.0
  673. IL_0168: ldstr "Eleventh case"
  674. IL_016d: call bool [mscorlib]System.String::op_Equality(string,
  675. string)
  676. IL_0172: brtrue.s IL_01b2
  677. IL_0174: br.s IL_01b8
  678. IL_0176: ldstr "Text1"
  679. IL_017b: ret
  680. IL_017c: ldstr "Text2"
  681. IL_0181: ret
  682. IL_0182: ldstr "Text3"
  683. IL_0187: ret
  684. IL_0188: ldstr "Text4"
  685. IL_018d: ret
  686. IL_018e: ldstr "Text5"
  687. IL_0193: ret
  688. IL_0194: ldstr "Text6"
  689. IL_0199: ret
  690. IL_019a: ldstr "Text7"
  691. IL_019f: ret
  692. IL_01a0: ldstr "Text8"
  693. IL_01a5: ret
  694. IL_01a6: ldstr "Text9"
  695. IL_01ab: ret
  696. IL_01ac: ldstr "Text10"
  697. IL_01b1: ret
  698. IL_01b2: ldstr "Text11"
  699. IL_01b7: ret
  700. IL_01b8: ldstr "Default"
  701. IL_01bd: ret
  702. } // end of method Switch::SwitchOverString2
  703. .method public hidebysig static string
  704. SwitchOverBool(bool b) cil managed
  705. {
  706. // Code size 43 (0x2b)
  707. .maxstack 8
  708. IL_0000: ldstr "SwitchOverBool: "
  709. IL_0005: ldarga.s b
  710. IL_0007: call instance string [mscorlib]System.Boolean::ToString()
  711. IL_000c: call string [mscorlib]System.String::Concat(string,
  712. string)
  713. IL_0011: call void [mscorlib]System.Console::WriteLine(string)
  714. IL_0016: ldarg.0
  715. IL_0017: brfalse.s IL_0023
  716. IL_0019: ldarg.0
  717. IL_001a: ldc.i4.1
  718. IL_001b: bne.un.s IL_0029
  719. IL_001d: ldsfld string [mscorlib]System.Boolean::TrueString
  720. IL_0022: ret
  721. IL_0023: ldsfld string [mscorlib]System.Boolean::FalseString
  722. IL_0028: ret
  723. IL_0029: ldnull
  724. IL_002a: ret
  725. } // end of method Switch::SwitchOverBool
  726. .method public hidebysig static void SwitchInLoop(int32 i) cil managed
  727. {
  728. // Code size 110 (0x6e)
  729. .maxstack 2
  730. IL_0000: ldstr "SwitchInLoop: "
  731. IL_0005: ldarg.0
  732. IL_0006: box [mscorlib]System.Int32
  733. IL_000b: call string [mscorlib]System.String::Concat(object,
  734. object)
  735. IL_0010: call void [mscorlib]System.Console::WriteLine(string)
  736. IL_0015: ldarg.0
  737. IL_0016: ldc.i4.1
  738. IL_0017: sub
  739. IL_0018: switch (
  740. IL_002f,
  741. IL_003b,
  742. IL_0052,
  743. IL_0047)
  744. IL_002d: br.s IL_0052
  745. IL_002f: ldstr "one"
  746. IL_0034: call void [mscorlib]System.Console::WriteLine(string)
  747. IL_0039: br.s IL_0067
  748. IL_003b: ldstr "two"
  749. IL_0040: call void [mscorlib]System.Console::WriteLine(string)
  750. IL_0045: br.s IL_0067
  751. IL_0047: ldstr "four"
  752. IL_004c: call void [mscorlib]System.Console::WriteLine(string)
  753. IL_0051: ret
  754. IL_0052: ldstr "default"
  755. IL_0057: call void [mscorlib]System.Console::WriteLine(string)
  756. IL_005c: ldstr "more code"
  757. IL_0061: call void [mscorlib]System.Console::WriteLine(string)
  758. IL_0066: ret
  759. IL_0067: ldarg.0
  760. IL_0068: ldc.i4.1
  761. IL_0069: add
  762. IL_006a: starg.s i
  763. IL_006c: br.s IL_0015
  764. } // end of method Switch::SwitchInLoop
  765. .method public hidebysig static void SwitchWithGoto(int32 i) cil managed
  766. {
  767. // Code size 113 (0x71)
  768. .maxstack 2
  769. IL_0000: ldstr "SwitchWithGoto: "
  770. IL_0005: ldarg.0
  771. IL_0006: box [mscorlib]System.Int32
  772. IL_000b: call string [mscorlib]System.String::Concat(object,
  773. object)
  774. IL_0010: call void [mscorlib]System.Console::WriteLine(string)
  775. IL_0015: ldarg.0
  776. IL_0016: ldc.i4.1
  777. IL_0017: sub
  778. IL_0018: switch (
  779. IL_002f,
  780. IL_003b,
  781. IL_0045,
  782. IL_0051)
  783. IL_002d: br.s IL_005c
  784. IL_002f: ldstr "one"
  785. IL_0034: call void [mscorlib]System.Console::WriteLine(string)
  786. IL_0039: br.s IL_005c
  787. IL_003b: ldstr "two"
  788. IL_0040: call void [mscorlib]System.Console::WriteLine(string)
  789. IL_0045: ldstr "three"
  790. IL_004a: call void [mscorlib]System.Console::WriteLine(string)
  791. IL_004f: br.s IL_0066
  792. IL_0051: ldstr "four"
  793. IL_0056: call void [mscorlib]System.Console::WriteLine(string)
  794. IL_005b: ret
  795. IL_005c: ldstr "default"
  796. IL_0061: call void [mscorlib]System.Console::WriteLine(string)
  797. IL_0066: ldstr "End of method"
  798. IL_006b: call void [mscorlib]System.Console::WriteLine(string)
  799. IL_0070: ret
  800. } // end of method Switch::SwitchWithGoto
  801. .method private hidebysig static class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty[]
  802. GetProperties() cil managed
  803. {
  804. // Code size 7 (0x7)
  805. .maxstack 8
  806. IL_0000: ldc.i4.0
  807. IL_0001: newarr ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty
  808. IL_0006: ret
  809. } // end of method Switch::GetProperties
  810. .method public hidebysig static void SwitchOnStringInForLoop() cil managed
  811. {
  812. // Code size 234 (0xea)
  813. .maxstack 2
  814. .locals init (class [mscorlib]System.Collections.Generic.List`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty> V_0,
  815. class [mscorlib]System.Collections.Generic.List`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty> V_1,
  816. class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty[] V_2,
  817. int32 V_3,
  818. class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty V_4,
  819. string V_5)
  820. IL_0000: newobj instance void class [mscorlib]System.Collections.Generic.List`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty>::.ctor()
  821. IL_0005: stloc.0
  822. IL_0006: newobj instance void class [mscorlib]System.Collections.Generic.List`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty>::.ctor()
  823. IL_000b: stloc.1
  824. IL_000c: call class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty[] ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch::GetProperties()
  825. IL_0011: stloc.2
  826. IL_0012: ldc.i4.0
  827. IL_0013: stloc.3
  828. IL_0014: br IL_00e0
  829. IL_0019: ldloc.2
  830. IL_001a: ldloc.3
  831. IL_001b: ldelem.ref
  832. IL_001c: stloc.s V_4
  833. IL_001e: ldloc.s V_4
  834. IL_0020: ldfld class [mscorlib]System.Reflection.PropertyInfo ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty::Property
  835. IL_0025: callvirt instance string [mscorlib]System.Reflection.MemberInfo::get_Name()
  836. IL_002a: stloc.s V_5
  837. IL_002c: ldloc.s V_5
  838. IL_002e: ldstr "Name1"
  839. IL_0033: call bool [mscorlib]System.String::op_Equality(string,
  840. string)
  841. IL_0038: brtrue.s IL_0082
  842. IL_003a: ldloc.s V_5
  843. IL_003c: ldstr "Name2"
  844. IL_0041: call bool [mscorlib]System.String::op_Equality(string,
  845. string)
  846. IL_0046: brtrue.s IL_0094
  847. IL_0048: ldloc.s V_5
  848. IL_004a: ldstr "Name3"
  849. IL_004f: call bool [mscorlib]System.String::op_Equality(string,
  850. string)
  851. IL_0054: brtrue.s IL_00a6
  852. IL_0056: ldloc.s V_5
  853. IL_0058: ldstr "Name4"
  854. IL_005d: call bool [mscorlib]System.String::op_Equality(string,
  855. string)
  856. IL_0062: brtrue.s IL_00b8
  857. IL_0064: ldloc.s V_5
  858. IL_0066: ldstr "Name5"
  859. IL_006b: call bool [mscorlib]System.String::op_Equality(string,
  860. string)
  861. IL_0070: brtrue.s IL_00ca
  862. IL_0072: ldloc.s V_5
  863. IL_0074: ldstr "Name6"
  864. IL_0079: call bool [mscorlib]System.String::op_Equality(string,
  865. string)
  866. IL_007e: brtrue.s IL_00ca
  867. IL_0080: br.s IL_00d4
  868. IL_0082: ldloc.s V_4
  869. IL_0084: ldc.i4.1
  870. IL_0085: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty::set_Set(int32)
  871. IL_008a: ldloc.0
  872. IL_008b: ldloc.s V_4
  873. IL_008d: callvirt instance void class [mscorlib]System.Collections.Generic.List`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty>::Add(!0)
  874. IL_0092: br.s IL_00dc
  875. IL_0094: ldloc.s V_4
  876. IL_0096: ldc.i4.2
  877. IL_0097: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty::set_Set(int32)
  878. IL_009c: ldloc.0
  879. IL_009d: ldloc.s V_4
  880. IL_009f: callvirt instance void class [mscorlib]System.Collections.Generic.List`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty>::Add(!0)
  881. IL_00a4: br.s IL_00dc
  882. IL_00a6: ldloc.s V_4
  883. IL_00a8: ldc.i4.3
  884. IL_00a9: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty::set_Set(int32)
  885. IL_00ae: ldloc.0
  886. IL_00af: ldloc.s V_4
  887. IL_00b1: callvirt instance void class [mscorlib]System.Collections.Generic.List`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty>::Add(!0)
  888. IL_00b6: br.s IL_00dc
  889. IL_00b8: ldloc.s V_4
  890. IL_00ba: ldc.i4.4
  891. IL_00bb: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty::set_Set(int32)
  892. IL_00c0: ldloc.0
  893. IL_00c1: ldloc.s V_4
  894. IL_00c3: callvirt instance void class [mscorlib]System.Collections.Generic.List`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty>::Add(!0)
  895. IL_00c8: br.s IL_00dc
  896. IL_00ca: ldloc.0
  897. IL_00cb: ldloc.s V_4
  898. IL_00cd: callvirt instance void class [mscorlib]System.Collections.Generic.List`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty>::Add(!0)
  899. IL_00d2: br.s IL_00dc
  900. IL_00d4: ldloc.1
  901. IL_00d5: ldloc.s V_4
  902. IL_00d7: callvirt instance void class [mscorlib]System.Collections.Generic.List`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch/SetProperty>::Add(!0)
  903. IL_00dc: ldloc.3
  904. IL_00dd: ldc.i4.1
  905. IL_00de: add
  906. IL_00df: stloc.3
  907. IL_00e0: ldloc.3
  908. IL_00e1: ldloc.2
  909. IL_00e2: ldlen
  910. IL_00e3: conv.i4
  911. IL_00e4: blt IL_0019
  912. IL_00e9: ret
  913. } // end of method Switch::SwitchOnStringInForLoop
  914. .method public hidebysig static void SwitchWithComplexCondition(string[] args) cil managed
  915. {
  916. // Code size 126 (0x7e)
  917. .maxstack 2
  918. .locals init (string V_0)
  919. IL_0000: ldarg.0
  920. IL_0001: ldlen
  921. IL_0002: brfalse.s IL_0009
  922. IL_0004: ldarg.0
  923. IL_0005: ldc.i4.0
  924. IL_0006: ldelem.ref
  925. IL_0007: br.s IL_000e
  926. IL_0009: ldstr "dummy"
  927. IL_000e: stloc.0
  928. IL_000f: ldloc.0
  929. IL_0010: ldstr "a"
  930. IL_0015: call bool [mscorlib]System.String::op_Equality(string,
  931. string)
  932. IL_001a: brtrue.s IL_0045
  933. IL_001c: ldloc.0
  934. IL_001d: ldstr "b"
  935. IL_0022: call bool [mscorlib]System.String::op_Equality(string,
  936. string)
  937. IL_0027: brtrue.s IL_0051
  938. IL_0029: ldloc.0
  939. IL_002a: ldstr "c"
  940. IL_002f: call bool [mscorlib]System.String::op_Equality(string,
  941. string)
  942. IL_0034: brtrue.s IL_005d
  943. IL_0036: ldloc.0
  944. IL_0037: ldstr "d"
  945. IL_003c: call bool [mscorlib]System.String::op_Equality(string,
  946. string)
  947. IL_0041: brtrue.s IL_0069
  948. IL_0043: br.s IL_0073
  949. IL_0045: ldstr "a"
  950. IL_004a: call void [mscorlib]System.Console::WriteLine(string)
  951. IL_004f: br.s IL_0073
  952. IL_0051: ldstr "b"
  953. IL_0056: call void [mscorlib]System.Console::WriteLine(string)
  954. IL_005b: br.s IL_0073
  955. IL_005d: ldstr "c"
  956. IL_0062: call void [mscorlib]System.Console::WriteLine(string)
  957. IL_0067: br.s IL_0073
  958. IL_0069: ldstr "d"
  959. IL_006e: call void [mscorlib]System.Console::WriteLine(string)
  960. IL_0073: ldstr "end"
  961. IL_0078: call void [mscorlib]System.Console::WriteLine(string)
  962. IL_007d: ret
  963. } // end of method Switch::SwitchWithComplexCondition
  964. .method public hidebysig static void SwitchWithArray(string[] args) cil managed
  965. {
  966. // Code size 115 (0x73)
  967. .maxstack 2
  968. .locals init (string V_0)
  969. IL_0000: ldarg.0
  970. IL_0001: ldc.i4.0
  971. IL_0002: ldelem.ref
  972. IL_0003: stloc.0
  973. IL_0004: ldloc.0
  974. IL_0005: ldstr "a"
  975. IL_000a: call bool [mscorlib]System.String::op_Equality(string,
  976. string)
  977. IL_000f: brtrue.s IL_003a
  978. IL_0011: ldloc.0
  979. IL_0012: ldstr "b"
  980. IL_0017: call bool [mscorlib]System.String::op_Equality(string,
  981. string)
  982. IL_001c: brtrue.s IL_0046
  983. IL_001e: ldloc.0
  984. IL_001f: ldstr "c"
  985. IL_0024: call bool [mscorlib]System.String::op_Equality(string,
  986. string)
  987. IL_0029: brtrue.s IL_0052
  988. IL_002b: ldloc.0
  989. IL_002c: ldstr "d"
  990. IL_0031: call bool [mscorlib]System.String::op_Equality(string,
  991. string)
  992. IL_0036: brtrue.s IL_005e
  993. IL_0038: br.s IL_0068
  994. IL_003a: ldstr "a"
  995. IL_003f: call void [mscorlib]System.Console::WriteLine(string)
  996. IL_0044: br.s IL_0068
  997. IL_0046: ldstr "b"
  998. IL_004b: call void [mscorlib]System.Console::WriteLine(string)
  999. IL_0050: br.s IL_0068
  1000. IL_0052: ldstr "c"
  1001. IL_0057: call void [mscorlib]System.Console::WriteLine(string)
  1002. IL_005c: br.s IL_0068
  1003. IL_005e: ldstr "d"
  1004. IL_0063: call void [mscorlib]System.Console::WriteLine(string)
  1005. IL_0068: ldstr "end"
  1006. IL_006d: call void [mscorlib]System.Console::WriteLine(string)
  1007. IL_0072: ret
  1008. } // end of method Switch::SwitchWithArray
  1009. } // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch
  1010. .class private auto ansi sealed '<PrivateImplementationDetails>'
  1011. extends [mscorlib]System.Object
  1012. {
  1013. .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
  1014. .method assembly hidebysig static uint32
  1015. ComputeStringHash(string s) cil managed
  1016. {
  1017. // Code size 44 (0x2c)
  1018. .maxstack 2
  1019. .locals init (uint32 V_0,
  1020. int32 V_1)
  1021. IL_0000: ldarg.0
  1022. IL_0001: brfalse.s IL_002a
  1023. IL_0003: ldc.i4 0x811c9dc5
  1024. IL_0008: stloc.0
  1025. IL_0009: ldc.i4.0
  1026. IL_000a: stloc.1
  1027. IL_000b: br.s IL_0021
  1028. IL_000d: ldarg.0
  1029. IL_000e: ldloc.1
  1030. IL_000f: callvirt instance char [mscorlib]System.String::get_Chars(int32)
  1031. IL_0014: ldloc.0
  1032. IL_0015: xor
  1033. IL_0016: ldc.i4 0x1000193
  1034. IL_001b: mul
  1035. IL_001c: stloc.0
  1036. IL_001d: ldloc.1
  1037. IL_001e: ldc.i4.1
  1038. IL_001f: add
  1039. IL_0020: stloc.1
  1040. IL_0021: ldloc.1
  1041. IL_0022: ldarg.0
  1042. IL_0023: callvirt instance int32 [mscorlib]System.String::get_Length()
  1043. IL_0028: blt.s IL_000d
  1044. IL_002a: ldloc.0
  1045. IL_002b: ret
  1046. } // end of method '<PrivateImplementationDetails>'::ComputeStringHash
  1047. } // end of class '<PrivateImplementationDetails>'
  1048. // =============================================================
  1049. // *********** DISASSEMBLY COMPLETE ***********************