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

cs1622.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 563889bd59b4298f2e496cb00728b8763ed9fbcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// cs1622.cs: Cannot return a value from iterators. Use the yield return statement to return a value, or yield break to end the iteration
// Line: 11
using System.Collections;

class X {
	IEnumerator MyEnumerator (int a)
	{
		if (a == 0)
			yield return 1;
		else
			return null;
	}

	static void Main ()
	{
	}
}