Few days back, I was working on an exception. So I was using "try-catch-finally" in a method, which is a very common technique for handling exception. For curiosity, I returned a value from the finally block and guess what?? I got this compiler error...
So this error happens when any jump statement (break, continue,
Image 1: Compile Error CS0157 in Xamarin Studio |
In image 1 a jump statement (return) is used in finally block.
Image 2: Successfully running the program. |
In Image 2 the jump statement is removed from finally block.
Enjoy your coding. Love "bugs" and "errors"
No comments:
Post a Comment