当我放入SecondMain()
try blcok 时,里面的最后一个块secondMain()
正在执行。但是当我把它放在外面时它没有执行。为什么不执行?
static void Main(string[] args)
{
try
{
SecondMain(args); //try putting
Console.WriteLine("try 1");
throw new Exception("Just fail me");
}
finally
{
Console.WriteLine("finally");
}
}
static void SecondMain(string[] args)
{
try
{
throw new StackOverflowException();
}
catch (Exception)
{
Console.WriteLine("catch");
throw;
}
finally
{
Console.WriteLine("finally");
}
}