2010-06-21 Atsushi Enomoto <atsushi@ximian.com>
[mcs.git] / tests / test-424.cs
blob482ba03670ccb5c2b29f9d17f0af40d558c11d75
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 static void Main ()
29 foreach (int a in X ()){