访问finally块函数的返回值函数、返回值、finally

由网友(只如初见)分享简介:我想知道是否有可能获得最后块中的函数的返回值。I'd like to know if it is possible to get the return value of a function inside a finally block.我有一些code,它是这样的。I have some code that i...

我想知道是否有可能获得最后块中的函数的返回值。

I'd like to know if it is possible to get the return value of a function inside a finally block.

我有一些code,它是这样的。

I have some code that is like this.

try
{
    return 1;
}
finally
{
    //Get the value 1
}

我知道这是可能通过添加可以保存返回值的变量。但我不知道是否有可能得到任何方式的价值。

I know it's possible by adding a variable that can hold the returned value. But I was wondering if it was possible to get the value in any way.

感谢

推荐答案

没有,你不能这样做。

No, you can't do that.

阅读全文

相关推荐

最新文章