Created
November 1, 2016 18:04
-
-
Save scionwest/5a8e3fa0d7cab2240d9786d0b82288bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| namespace ConsoleApplication1 | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| try | |
| { | |
| try | |
| { | |
| throw new Exception(); | |
| } | |
| finally | |
| { | |
| Console.WriteLine("A"); | |
| } | |
| } | |
| catch (Exception) when (ShouldProcessCondition()) | |
| { | |
| Console.WriteLine("B"); | |
| } | |
| Console.ReadKey(); | |
| } | |
| static bool ShouldProcessCondition() | |
| { | |
| Console.WriteLine("C"); | |
| return true; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment