2010-06-04 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / gtest-iter-07.cs
blob80ac3b15e9138ff4b59a8f8bc89e6b1326e6c251
1 using System;
2 using System.Collections.Generic;
4 public class Test
6 public static int Main ()
8 MySystem mySystem = new MySystem ();
9 return 0;
12 public static void TestFunction (IEnumerable<string> items)
14 List<string> newList;
15 Console.WriteLine ("1");
16 newList = new List<string> (items);
17 Console.WriteLine ("2");
18 newList = new List<string> (items);
22 public class MySystem
24 private List<string> _items = new List<string> ();
26 public MySystem ()
28 _items.Add ("a");
31 public IEnumerable<string> Items
33 get
35 foreach (string i in _items) {
36 Console.WriteLine (i);
37 yield return i;