asp教程:深入解析Close()和Dispose()的区别
日期:07-27  来源:
中国设计秀 作者:cnwebshow.com
Close()方法调用的是带参数的Dispose方法,然后调用GC.SuppressFinalizentX中国设计秀
ntX中国设计秀
(this);请求系统不要调用指定对象的终结器。而Dispose()方法直接调用Close()方法!ntX中国设计秀
对于FileStream类来说,Close()方法和Dispose()方法是没有区别!ntX中国设计秀