Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gtest-062.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0e4a54d4479d1cd0b0cb4856cdf573677a59dd3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using System.Collections.Generic;

class X
{
	public IEnumerable<int> Test (int a, long b)
	{
		while (a < b) {
			a++;
			yield return a;
		}
        }

	public static int Main ()
	{
		X x = new X ();
		int sum = 0;
		foreach (int i in x.Test (3, 8L))
			sum += i;

		return sum == 30 ? 0 : 1;
	}
}