无法计算表达式,因为代码已优化或本机帧位于调用堆栈之上。 [英] Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.

查看:75
本文介绍了无法计算表达式,因为代码已优化或本机帧位于调用堆栈之上。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好伙计



想知道C中的这个例外情况#





无法评估表达式,因为代码已优化或本机框位于调用堆栈之上。



无论什么时候becoz任务完成,但第二种方式我认为物质非常重要,当它到来时............

hello Guys

want to know about this Exception in C#


Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.

no matter when it comes becoz task was completed but in 2nd way i think matter is very important when it comes............

推荐答案

你在catch方法中使用throw函数吗?



throw必须在try方法中使用。



你可以做什么,例如



are you using throw function inside the catch method ?

throw must but used inside the try method.

what You can do, for exemple

try
{
 x++;
 if (x == 3)
 {
   throw new exception(); //( correct me if i'm wrong)
 }
}
catch(Exception ex)
{
  Console.Write(ex.message); // to show error type
  x = 2
}

//if an error occurs, of if x == 3, the catch method will be executed.





它能回答你的问题吗?



does it answer your question ?


这篇关于无法计算表达式,因为代码已优化或本机帧位于调用堆栈之上。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆