Merge pull request #4845 from lambdageek/dev-coop-delegates
[mono.git] / mcs / errors / cs1622-3.cs
1 // CS1622: Cannot return a value from iterators. Use the yield return statement to return a value, or yield break to end the iteration
2 // Line: 21
3
4 using System.Collections.Generic;
5
6 namespace McsDiff
7 {
8         class MyObj
9         {
10         }
11         
12         class MainClass
13         {
14                 protected static IEnumerable<MyObj> GetStuff ()
15                 {
16                         yield return null;
17                         
18                         try {
19                         }
20                         catch {
21                                 return;
22                         }
23                 }
24         }
25 }