using System;<br> using System.Threading;<br><br> class App<br>{<br><br> static void DoSmth()<br>{<br> // TODO : Add code here <br>}<br><br> static void Main()<br>{<br> try <br> {<br> Console .WriteLine( "veni" );<br> DoSmth();<br> }<br> catch (ThreadAbortException)<br> {<br> Console .WriteLine( "vidi" );<br> }<br> Console .WriteLine( "vici" );<br>}<br>} <br><br> * This source code was highlighted with Source Code Highlighter .
WriteLine
, overriding ThreadAbortException
not allowed. Also, you can not change the code Main. Focus on DoSmth()
, the solution can be found there :)Source: https://habr.com/ru/post/77829/
All Articles