摘要: //只有在需要撤销或恢复功能时,写为命令模式才用意义。namespace ConsoleApplication1{//摘要://当一个请求被封装为对象时,从而使得可以用不同的请求对客户端进行参数化;对请求排队或记录请求日志,以及支持撤销的操作。public abstract class CommandPattern{protected Hashtable hash;protected Receiver receiver;public CommandPattern(Receiver r){receiver = r;}public abstract void Excute();public abs 阅读全文
posted @ 2011-11-10 13:54 viola 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 1..sortedList集合中的元素删除后,并不会更新其索引。(不在内存中更新其后续元素)。2..private SortedList lists=new SortedList();private AssamblyInfo GetAssemblyByIndex(int index){return (AssamblyInfo)lists[index];}返回的是对象的引用。private AssamblyInfo GetAssemblyByName(string name){foreach (AssamblyInfo item in lists.Values){if (item.Name == 阅读全文
posted @ 2011-11-10 13:53 viola 阅读(184) 评论(0) 推荐(0) 编辑