linux-packaging-mono/mcs/tests/gtest-iter-07.cs
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

42 lines
644 B
C#

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