[build] Fix warning (#4177)
[mono-project.git] / mcs / tests / test-iter-14.cs
blob62ddd6d632fdab0c9acf6717e040bc321fd938a6
1 //
2 // Sample for bug 75674
3 //
4 using System;
5 using System.Collections;
7 class XX {
8 static void Metodo (Exception e)
10 if (e is NotImplementedException){
11 Console.WriteLine ("OK");
12 } else {
13 Console.WriteLine ("Fail");
17 static IEnumerable X ()
19 try {
20 throw new NotImplementedException ();
21 } catch (Exception e){
22 Metodo (e);
24 yield return 0;
27 public static void Main ()
29 foreach (int a in X ()){