mirror of https://github.com/icsharpcode/ILSpy.git
4 changed files with 39 additions and 0 deletions
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
using System; |
||||
using System.Collections; |
||||
using System.Runtime.CompilerServices; |
||||
|
||||
public class VBNonGenericForEach |
||||
{ |
||||
public static void M() |
||||
{ |
||||
ArrayList arrayList = new ArrayList(); |
||||
foreach (object item in arrayList) |
||||
{ |
||||
#if ROSLYN && OPT
|
||||
Console.WriteLine(RuntimeHelpers.GetObjectValue(RuntimeHelpers.GetObjectValue(item))); |
||||
#else
|
||||
object objectValue = RuntimeHelpers.GetObjectValue(item); |
||||
Console.WriteLine(RuntimeHelpers.GetObjectValue(objectValue)); |
||||
#endif
|
||||
} |
||||
} |
||||
} |
@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
|
||||
Imports System |
||||
Imports System.Collections |
||||
|
||||
Public Class VBNonGenericForEach |
||||
Public Shared Sub M() |
||||
Dim collection = New ArrayList |
||||
For Each element In collection |
||||
Console.WriteLine(element) |
||||
Next |
||||
End Sub |
||||
End Class |
Loading…
Reference in new issue