Browse Source

Add pretty test for captured variable in foreach loop.

pull/892/head
Siegfried Pammer 8 years ago
parent
commit
6f5737cbfa
  1. 12
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.cs
  2. 104
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.il
  3. 88
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.opt.il
  4. 81
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.opt.roslyn.il
  5. 92
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.roslyn.il

12
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.cs

@ -256,6 +256,10 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -256,6 +256,10 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
{
}
private static void Operation(Func<bool> f)
{
}
public void ForEach(IEnumerable<string> enumerable)
{
foreach (string item in enumerable) {
@ -379,6 +383,14 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -379,6 +383,14 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
Loops.Operation(ref current);
}
}
public static void ForeachWithCapturedVariable(List<int> items)
{
foreach (int item in items) {
int c = item;
Loops.Operation((Func<bool>)(() => c == 5));
}
}
#endregion
//public void ForEachOverArray(string[] array)
//{

104
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.il

@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly tv41vlwg
.assembly z3mgs0mc
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.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
@ -20,15 +20,15 @@ @@ -20,15 +20,15 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module tv41vlwg.dll
// MVID: {4100A512-8776-4CC7-9C57-3B897002C50E}
.module z3mgs0mc.dll
// MVID: {DFF5B624-B244-4A64-9EE1-6A76A74C08D2}
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x02EF0000
// Image base: 0x01040000
// =============== CLASS MEMBERS DECLARATION ===================
@ -584,6 +584,40 @@ @@ -584,6 +584,40 @@
} // end of property CustomStructEnumeratorWithIDisposable`1::Current
} // end of class CustomStructEnumeratorWithIDisposable`1
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass1'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 c
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method '<>c__DisplayClass1'::.ctor
.method public hidebysig instance bool
'<ForeachWithCapturedVariable>b__0'() cil managed
{
// Code size 14 (0xe)
.maxstack 2
.locals init (bool V_0)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops/'<>c__DisplayClass1'::c
IL_0006: ldc.i4.5
IL_0007: ceq
IL_0009: stloc.0
IL_000a: br.s IL_000c
IL_000c: ldloc.0
IL_000d: ret
} // end of method '<>c__DisplayClass1'::'<ForeachWithCapturedVariable>b__0'
} // end of class '<>c__DisplayClass1'
.method private hidebysig static void Operation(int32& item) cil managed
{
// Code size 2 (0x2)
@ -592,6 +626,14 @@ @@ -592,6 +626,14 @@
IL_0001: ret
} // end of method Loops::Operation
.method private hidebysig static void Operation(class [mscorlib]System.Func`1<bool> f) cil managed
{
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Loops::Operation
.method public hidebysig instance void
ForEach(class [mscorlib]System.Collections.Generic.IEnumerable`1<string> enumerable) cil managed
{
@ -1289,6 +1331,60 @@ @@ -1289,6 +1331,60 @@
IL_003c: ret
} // end of method Loops::ForeachWithRefUsage
.method public hidebysig static void ForeachWithCapturedVariable(class [mscorlib]System.Collections.Generic.List`1<int32> items) cil managed
{
// Code size 82 (0x52)
.maxstack 2
.locals init (int32 V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops/'<>c__DisplayClass1' V_1,
valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32> V_2,
bool V_3)
IL_0000: nop
IL_0001: nop
IL_0002: ldarg.0
IL_0003: callvirt instance valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<!0> class [mscorlib]System.Collections.Generic.List`1<int32>::GetEnumerator()
IL_0008: stloc.2
.try
{
IL_0009: br.s IL_0034
IL_000b: ldloca.s V_2
IL_000d: call instance !0 valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32>::get_Current()
IL_0012: stloc.0
IL_0013: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops/'<>c__DisplayClass1'::.ctor()
IL_0018: stloc.1
IL_0019: nop
IL_001a: ldloc.1
IL_001b: ldloc.0
IL_001c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops/'<>c__DisplayClass1'::c
IL_0021: ldloc.1
IL_0022: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops/'<>c__DisplayClass1'::'<ForeachWithCapturedVariable>b__0'()
IL_0028: newobj instance void class [mscorlib]System.Func`1<bool>::.ctor(object,
native int)
IL_002d: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops::Operation(class [mscorlib]System.Func`1<bool>)
IL_0032: nop
IL_0033: nop
IL_0034: ldloca.s V_2
IL_0036: call instance bool valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32>::MoveNext()
IL_003b: stloc.3
IL_003c: ldloc.3
IL_003d: brtrue.s IL_000b
IL_003f: leave.s IL_0050
} // end .try
finally
{
IL_0041: ldloca.s V_2
IL_0043: constrained. valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32>
IL_0049: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_004e: nop
IL_004f: endfinally
} // end handler
IL_0050: nop
IL_0051: ret
} // end of method Loops::ForeachWithCapturedVariable
.method public hidebysig instance void
ForOverArray(string[] 'array') cil managed
{

88
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.opt.il

@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly gqwlhkac
.assembly xmbkcaue
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.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
@ -20,15 +20,15 @@ @@ -20,15 +20,15 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module gqwlhkac.dll
// MVID: {C686C014-E24C-4F11-8C65-376BF4FB1D57}
.module xmbkcaue.dll
// MVID: {B93067D3-FF54-496F-AEF3-E89E52491AE6}
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x029F0000
// Image base: 0x02F70000
// =============== CLASS MEMBERS DECLARATION ===================
@ -506,6 +506,35 @@ @@ -506,6 +506,35 @@
} // end of property CustomStructEnumeratorWithIDisposable`1::Current
} // end of class CustomStructEnumeratorWithIDisposable`1
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass1'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 c
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method '<>c__DisplayClass1'::.ctor
.method public hidebysig instance bool
'<ForeachWithCapturedVariable>b__0'() cil managed
{
// Code size 10 (0xa)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops/'<>c__DisplayClass1'::c
IL_0006: ldc.i4.5
IL_0007: ceq
IL_0009: ret
} // end of method '<>c__DisplayClass1'::'<ForeachWithCapturedVariable>b__0'
} // end of class '<>c__DisplayClass1'
.method private hidebysig static void Operation(int32& item) cil managed
{
// Code size 1 (0x1)
@ -513,6 +542,13 @@ @@ -513,6 +542,13 @@
IL_0000: ret
} // end of method Loops::Operation
.method private hidebysig static void Operation(class [mscorlib]System.Func`1<bool> f) cil managed
{
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Loops::Operation
.method public hidebysig instance void
ForEach(class [mscorlib]System.Collections.Generic.IEnumerable`1<string> enumerable) cil managed
{
@ -1040,6 +1076,50 @@ @@ -1040,6 +1076,50 @@
IL_0033: ret
} // end of method Loops::ForeachWithRefUsage
.method public hidebysig static void ForeachWithCapturedVariable(class [mscorlib]System.Collections.Generic.List`1<int32> items) cil managed
{
// Code size 73 (0x49)
.maxstack 2
.locals init (int32 V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops/'<>c__DisplayClass1' V_1,
valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32> V_2)
IL_0000: ldarg.0
IL_0001: callvirt instance valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<!0> class [mscorlib]System.Collections.Generic.List`1<int32>::GetEnumerator()
IL_0006: stloc.2
.try
{
IL_0007: br.s IL_002f
IL_0009: ldloca.s V_2
IL_000b: call instance !0 valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32>::get_Current()
IL_0010: stloc.0
IL_0011: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops/'<>c__DisplayClass1'::.ctor()
IL_0016: stloc.1
IL_0017: ldloc.1
IL_0018: ldloc.0
IL_0019: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops/'<>c__DisplayClass1'::c
IL_001e: ldloc.1
IL_001f: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops/'<>c__DisplayClass1'::'<ForeachWithCapturedVariable>b__0'()
IL_0025: newobj instance void class [mscorlib]System.Func`1<bool>::.ctor(object,
native int)
IL_002a: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops::Operation(class [mscorlib]System.Func`1<bool>)
IL_002f: ldloca.s V_2
IL_0031: call instance bool valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32>::MoveNext()
IL_0036: brtrue.s IL_0009
IL_0038: leave.s IL_0048
} // end .try
finally
{
IL_003a: ldloca.s V_2
IL_003c: constrained. valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32>
IL_0042: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_0047: endfinally
} // end handler
IL_0048: ret
} // end of method Loops::ForeachWithCapturedVariable
.method public hidebysig instance void
ForOverArray(string[] 'array') cil managed
{

81
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.opt.roslyn.il

@ -25,14 +25,14 @@ @@ -25,14 +25,14 @@
.ver 0:0:0:0
}
.module Loops.dll
// MVID: {D4B3ED88-9C2E-4892-ADBB-4383F95FBA96}
// MVID: {24FAF99A-6A32-4D9C-94BB-1EEBD46F590F}
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x024C0000
// Image base: 0x030C0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -510,6 +510,35 @@ @@ -510,6 +510,35 @@
} // end of property CustomStructEnumeratorWithIDisposable`1::Current
} // end of class CustomStructEnumeratorWithIDisposable`1
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass23_0'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 c
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method '<>c__DisplayClass23_0'::.ctor
.method assembly hidebysig instance bool
'<ForeachWithCapturedVariable>b__0'() cil managed
{
// Code size 10 (0xa)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops/'<>c__DisplayClass23_0'::c
IL_0006: ldc.i4.5
IL_0007: ceq
IL_0009: ret
} // end of method '<>c__DisplayClass23_0'::'<ForeachWithCapturedVariable>b__0'
} // end of class '<>c__DisplayClass23_0'
.method private hidebysig static void Operation(int32& item) cil managed
{
// Code size 1 (0x1)
@ -517,6 +546,13 @@ @@ -517,6 +546,13 @@
IL_0000: ret
} // end of method Loops::Operation
.method private hidebysig static void Operation(class [mscorlib]System.Func`1<bool> f) cil managed
{
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Loops::Operation
.method public hidebysig instance void
ForEach(class [mscorlib]System.Collections.Generic.IEnumerable`1<string> enumerable) cil managed
{
@ -1011,6 +1047,47 @@ @@ -1011,6 +1047,47 @@
IL_0031: ret
} // end of method Loops::ForeachWithRefUsage
.method public hidebysig static void ForeachWithCapturedVariable(class [mscorlib]System.Collections.Generic.List`1<int32> items) cil managed
{
// Code size 71 (0x47)
.maxstack 3
.locals init (valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32> V_0,
int32 V_1)
IL_0000: ldarg.0
IL_0001: callvirt instance valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<!0> class [mscorlib]System.Collections.Generic.List`1<int32>::GetEnumerator()
IL_0006: stloc.0
.try
{
IL_0007: br.s IL_002d
IL_0009: ldloca.s V_0
IL_000b: call instance !0 valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32>::get_Current()
IL_0010: stloc.1
IL_0011: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops/'<>c__DisplayClass23_0'::.ctor()
IL_0016: dup
IL_0017: ldloc.1
IL_0018: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops/'<>c__DisplayClass23_0'::c
IL_001d: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops/'<>c__DisplayClass23_0'::'<ForeachWithCapturedVariable>b__0'()
IL_0023: newobj instance void class [mscorlib]System.Func`1<bool>::.ctor(object,
native int)
IL_0028: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops::Operation(class [mscorlib]System.Func`1<bool>)
IL_002d: ldloca.s V_0
IL_002f: call instance bool valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32>::MoveNext()
IL_0034: brtrue.s IL_0009
IL_0036: leave.s IL_0046
} // end .try
finally
{
IL_0038: ldloca.s V_0
IL_003a: constrained. valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32>
IL_0040: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_0045: endfinally
} // end handler
IL_0046: ret
} // end of method Loops::ForeachWithCapturedVariable
.method public hidebysig instance void
ForOverArray(string[] 'array') cil managed
{

92
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.roslyn.il

@ -25,14 +25,14 @@ @@ -25,14 +25,14 @@
.ver 0:0:0:0
}
.module Loops.dll
// MVID: {58DE4DF4-CF99-4DFB-BA97-F0BB418C7543}
// MVID: {2A93944A-F762-497A-85EF-B93263897E0E}
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x007E0000
// Image base: 0x00B70000
// =============== CLASS MEMBERS DECLARATION ===================
@ -592,6 +592,36 @@ @@ -592,6 +592,36 @@
} // end of property CustomStructEnumeratorWithIDisposable`1::Current
} // end of class CustomStructEnumeratorWithIDisposable`1
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass23_0'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 c
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop
IL_0007: ret
} // end of method '<>c__DisplayClass23_0'::.ctor
.method assembly hidebysig instance bool
'<ForeachWithCapturedVariable>b__0'() cil managed
{
// Code size 10 (0xa)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops/'<>c__DisplayClass23_0'::c
IL_0006: ldc.i4.5
IL_0007: ceq
IL_0009: ret
} // end of method '<>c__DisplayClass23_0'::'<ForeachWithCapturedVariable>b__0'
} // end of class '<>c__DisplayClass23_0'
.method private hidebysig static void Operation(int32& item) cil managed
{
// Code size 2 (0x2)
@ -600,6 +630,14 @@ @@ -600,6 +630,14 @@
IL_0001: ret
} // end of method Loops::Operation
.method private hidebysig static void Operation(class [mscorlib]System.Func`1<bool> f) cil managed
{
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Loops::Operation
.method public hidebysig instance void
ForEach(class [mscorlib]System.Collections.Generic.IEnumerable`1<string> enumerable) cil managed
{
@ -1215,6 +1253,56 @@ @@ -1215,6 +1253,56 @@
IL_0039: ret
} // end of method Loops::ForeachWithRefUsage
.method public hidebysig static void ForeachWithCapturedVariable(class [mscorlib]System.Collections.Generic.List`1<int32> items) cil managed
{
// Code size 79 (0x4f)
.maxstack 2
.locals init (valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32> V_0,
int32 V_1,
class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops/'<>c__DisplayClass23_0' V_2)
IL_0000: nop
IL_0001: nop
IL_0002: ldarg.0
IL_0003: callvirt instance valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<!0> class [mscorlib]System.Collections.Generic.List`1<int32>::GetEnumerator()
IL_0008: stloc.0
.try
{
IL_0009: br.s IL_0034
IL_000b: ldloca.s V_0
IL_000d: call instance !0 valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32>::get_Current()
IL_0012: stloc.1
IL_0013: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops/'<>c__DisplayClass23_0'::.ctor()
IL_0018: stloc.2
IL_0019: nop
IL_001a: ldloc.2
IL_001b: ldloc.1
IL_001c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops/'<>c__DisplayClass23_0'::c
IL_0021: ldloc.2
IL_0022: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops/'<>c__DisplayClass23_0'::'<ForeachWithCapturedVariable>b__0'()
IL_0028: newobj instance void class [mscorlib]System.Func`1<bool>::.ctor(object,
native int)
IL_002d: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Loops::Operation(class [mscorlib]System.Func`1<bool>)
IL_0032: nop
IL_0033: nop
IL_0034: ldloca.s V_0
IL_0036: call instance bool valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32>::MoveNext()
IL_003b: brtrue.s IL_000b
IL_003d: leave.s IL_004e
} // end .try
finally
{
IL_003f: ldloca.s V_0
IL_0041: constrained. valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32>
IL_0047: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_004c: nop
IL_004d: endfinally
} // end handler
IL_004e: ret
} // end of method Loops::ForeachWithCapturedVariable
.method public hidebysig instance void
ForOverArray(string[] 'array') cil managed
{

Loading…
Cancel
Save