Vb.net尝试最后(没有捕获)

时间:2010-02-10 14:51:29

标签: .net vb.net try-catch

测验问题:运行以下程序的输出是什么:

 Sub Main()
      Try
         CallToMethodThatThrowsException()
      Catch ex As ArgumentException
         Console.WriteLine("Argument exception caught")
      Finally
         Console.WriteLine("Outer finally block")
      End Try
   End Sub

   Public Sub CallToMethodThatThrowsException()
      Try
         ThrowExceptionMethod()
      Finally
         Console.WriteLine("Inner finally block")
      End Try
   End Sub

   Public Sub ThrowExceptionMethod()
      Throw New ArgumentException()
   End Sub

没有代码请写:) - 第一个正确回答获得大奖(一个接受的答案:))

2 个答案:

答案 0 :(得分:3)

我假设:
内心终于阻止了 争议异常被抓住了 外最后一块

答案 1 :(得分:2)

“内心终于阻挡”
“争议异常被抓住” “外面最后阻止”