using System; using System.Collections.Generic; public class Test { public static int Main () { MySystem mySystem = new MySystem (); return 0; } public static void TestFunction (IEnumerable items) { List newList; Console.WriteLine ("1"); newList = new List (items); Console.WriteLine ("2"); newList = new List (items); } } public class MySystem { private List _items = new List (); public MySystem () { _items.Add ("a"); } public IEnumerable Items { get { foreach (string i in _items) { Console.WriteLine (i); yield return i; } } } }