Restrictions of yield in try-catch.
Interview question and answer by: Bhakti
| Posted on: 12/15/2009 | Category: C# Interview questions
| Views: 2069 |
While using yield keyword, mainly two restrictions are observed.
First is , we can’t use yield in finally.
Second is , we can’t place yield keyword in the catch block if try contains more than one catch blocks.
| Alert Moderator
Found interesting? Add this to: