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

21 lines
333 B
C#

using System;
using System.Collections.Generic;
class Test
{
static IEnumerable<T> Create<T> (T [,] self)
{
for (int i = 0; i < self.Length; ++i)
yield return self [0, i];
}
public static int Main ()
{
int [,] s = new int [,] { { 1, 2, 3 } };
foreach (int i in Create (s))
Console.WriteLine (i);
return 0;
}
}