摘要: 模式描述:确保一个类只有一个实例,并提供访问这个实例的全局点. CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->using System;using System.Collections.Generic;using System.Linq;... 阅读全文
posted @ 2009-03-18 13:57 chunchill 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 这些天又仔细看了遍MSDN中的C#编程指南,有些细节的东西顺便就记下了: C#:结构可以实现接口,但它们无法继承另一个结构。因此,结构成员无法声明为 protected。从 enum 类型到整型的转换需要用显式类型转换来完成。对同一成员同时使用 new 和 override 是错误的做法,因为这两个修饰符的含义互斥。new 修饰符会用同样的名称创建一个新成员并使原始成员变为隐藏的。override... 阅读全文
posted @ 2009-03-18 10:46 chunchill 阅读(233) 评论(0) 推荐(0) 编辑