阅读背景:

如何在绘图和应用程序退出时防止C#中的ObjectDisposedException

来源:互联网 

I'm a CompSci student, and fairly new at C#, and I was doing a "Josephus Problem" program for a class, and I created an Exit button that calls Application.Exit() to exit at anytime, but if C# is still working on painting and the button is pressed it throws an ObjectDisposedExeception for the Graphics object. Is there any way to prevent this?. I was thinking of try{}catch or change a boolean to tell the painting process to stop before exiting, but I want to know if there's another solution.I'm a CompSci student, and fairly new at C#, an




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: