2017年9月19日

.NET基础知识(四)

摘要: 1、能用foreach遍历访问的对象有什么要求? 答:需要实现IEnumerable接口或声明GetEnumerator方法的类型。 2、GC是什么?为什么要有GC? 答:GC是垃圾收集器。 程序员不用担心内存管理,因为垃圾收集器会自动进行管理。 GC只能处理托管内存资源的释放,对于非托管资源则不能 阅读全文

posted @ 2017-09-19 16:00 —守玉— 阅读(116) 评论(0) 推荐(0) 编辑

.NET基础知识(三)

摘要: 1、请编程遍历winform窗口上所有TextBox控件,并给它的Text属性赋值为string.Empty。 答:using System.Windows.Forms; foreach (Control control in this.Controls) { if(control is TextB 阅读全文

posted @ 2017-09-19 15:53 —守玉— 阅读(185) 评论(0) 推荐(0) 编辑

导航