blob: f2e04f7618b4cd955d957155b9ba410a78b5a696 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
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;
}
}
|