什么是Control.Disposing属性? [英] What is Control.Disposing Property?

查看:85
本文介绍了什么是Control.Disposing属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据MSDN:



Control.Disposing属性获取一个值,该值指示基本Control类是否正在处理。



但是当我检查时,控件的Disposing属性总是假的(在Dispose()方法本身内)。



什么时候会此Disposing属性是否成立?

According to MSDN:

Control.Disposing Property Gets a value indicating whether the base Control class is in the process of disposing.

But when I checked, Disposing property of the control is always false (inside the Dispose() method itself).

When will this Disposing property become true?

推荐答案

您好,



如MSDN所述,如果控件在处理过程中,Control.Disposing 属性将返回true。因此,当正常检查时,它返回false,当 Control_Disposing事件将被触发时,属性将返回true 。处理事件发生时,即控制权处理完毕。 在处置事件期间,Disposing属性将返回true



希望它有所帮助。
Hi,

As MSDN describes, Control.Disposing property will return true if the control in the process of disposing. so, when check normally, it returns false, the property will return true when the Control_Disposing event will be fired. when the disposing event will fire, that means the control got disposed. during the disposing event the Disposing property will return true.

hope it helps.


hi ,$ / b $ b $ / b
Control.Dispose(boolean) [ ^ ]



我希望它会对你有帮助。



Control.Dispose(boolean)[^]

I hope it will help you.


这篇关于什么是Control.Disposing属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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