摘要: 1. Contrasting Interfaces to Abstract Base ClassesAbstract base classes do far more than define a group of abstract methods. They are free to define public, private, and protected state data, as well as any number of concrete methods that can be accessed by the subclasses.Interfaces, on the other ha 阅读全文
posted @ 2010-01-25 17:54 FangwenYu 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 1. Calling Garbage CollectionIf you determine it may be beneficial to have the garbage collector check for unreachable objects, you could explicitly trigger a garbage collection, as follows: 1: static void Main(string[] args) 2: { 3: ... 4: // Force a garbage collection and wait for 5: // each objec 阅读全文
posted @ 2010-01-25 14:44 FangwenYu 阅读(456) 评论(0) 推荐(0) 编辑