[tuner] handle the case with multiple "preserve" attributes
[mono-project.git] / mcs / tests / test-iter-18.cs
blob9fd5e19bbd70e1907ded082686791e15ed59dba2
1 // Test case for Bug #75934
2 // Checks for duplicate field names
4 using System;
5 using System.Collections;
6 using System.Reflection;
8 class test
10 public IEnumerable testen (int x)
12 for (int i = 0;i < x; i++)
13 if (i % 2 == 0) {
14 int o = i;
15 yield return o;
16 } else {
17 int o = i*2;
18 yield return o;
23 class reflect
25 public static void Main (string [] args)
27 Hashtable ht = new Hashtable ();
28 Assembly asm = Assembly.GetAssembly (typeof (test));
29 foreach (Type t in asm.GetTypes ()) {
30 ht.Clear ();
31 foreach (FieldInfo fi in t.GetFields (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance))
32 ht.Add (fi.Name, fi);