帮我解决这个错误 [英] help me for solving this error
本文介绍了帮我解决这个错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何处理ObjectDisposedException?
how to handle with ObjectDisposedException ?
推荐答案
在c#中你无法绑定一个Object。
如果CLR发现此对象不再可用,则从内存中释放。
如果你想要CLR不要处置你的对象。然后把它存放在静态var
就像
//
public static Form _F;
表格f =新表格();
_F = f;
现在这个对象永远不会被CLR处理,直到应用程序关闭
in c# you can not bound an Object.
if CLR find that this object is not longer usable it Disposed from the memory .
if you want CLR not Dispose your object . then store it in an static var
like
//
public static Form _F;
Form f=new Form();
_F=f;
now this object never Dispose by CLR until the application will close
这篇关于帮我解决这个错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文