+ 2
how is this possible ?
Task.run(()=> { try { statement; } catch(exception ex){} Console.write("Hi"); } is there any chance that when any exception will occur it will not print....because i was doing exactly the same..in the statement i was aborting some other thread..but whenever any exception occurs It doesn't print the Hi message....why?
2 Answers
+ 8
@Somnath, I could be wrong, but isn't the Console.Write supposed to be wrapped inside the catch's curly braces if we want to print "Hi" on exception? Btw, you know this is C#, tell me why did you mix your tags with Python and Java?
+ 1
No...it should be after catch...i tagged python,java just to reach maximum people as many of them know 2-3 language but they give suggestion on their current language.