summaryrefslogtreecommitdiff
path: root/mcs/errors/cs1626-2.cs
blob: 8894ad780f58510eeca04b81266602f7a1ffc657 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// CS1626: Cannot yield a value in the body of a try block with a catch clause
// Line: 11

using System.Collections;

class C: IEnumerable
{
   public IEnumerator GetEnumerator ()
   {
	   try {
	       try {
		   yield return this;
	       }
	       finally {}
	   }
	   catch (System.Exception) {
	   }
   }
}