Created
June 17, 2017 00:16
-
-
Save albizures/f6f46440051e22efa7aca97e271742a3 to your computer and use it in GitHub Desktop.
c#
This file contains 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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
using System.Threading; | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
Thread miThread = new Thread(new ThreadStart(Test)); | |
miThread.Start(); | |
int a = 10; | |
try | |
{ | |
a = a / 0; | |
} | |
catch (DivideByZeroException e) | |
{ | |
Console.WriteLine("Error!!!"); | |
Console.WriteLine(e); | |
} | |
finally | |
{ | |
Console.WriteLine("Ended"); | |
} | |
} | |
public static void Test() | |
{ | |
Console.WriteLine("Thread"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment