Код: Выделить всё
private static void ThreadFunc() {
ulong counter = 0;
while (true) {
try {
Console.WriteLine( "{0}", counter++ );
}
catch (ThreadAbortException) {
Console.WriteLine( "Abort!" );
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/185 ... atch-block
Мобильная версия