public static int Main(String []args) { String s = "Done"; int retVal = 100; Thread mv_Thread; NestedException [] ne = new NestedException[10]; for (int i = 0 ; i < 10; i++){ ne[i] = new NestedException(i); mv_Thread = new Thread(new ThreadStart(ne[i].runtest)); try { mv_Thread.Start(); } catch (Exception ){ retVal = 0; Console.WriteLine("Exception was caught in main"); } } Console.WriteLine(s); return retVal; }
public static int Main(String [] args) { String s = "Done"; int retVal = 100; Thread mv_Thread; NestedException [] ne = new NestedException[10]; for (int i = 0; i < 10; i++) { ne[i] = new NestedException(i); mv_Thread = new Thread(new ThreadStart(ne[i].runtest)); try { mv_Thread.Start(); } catch (Exception) { retVal = 0; Console.WriteLine("Exception was caught in main"); } } Console.WriteLine(s); return(retVal); }