访问finally块函数的返回值 [英] Access the value returned by a function in a finally block
本文介绍了访问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 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.
这篇关于访问finally块函数的返回值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文