01 2007 档案

摘要:Hashtable 的烦恼! using System;using System.Collections;namespace NoSortHashtable{ /// /// Summary description for Class1. /// class Class1 { /// /// The main entry poin... 阅读全文
posted @ 2007-01-31 23:13 wenanry 阅读(1215) 评论(1) 推荐(0) 编辑
摘要:一,哈希表(Hashtable)简述在.NET Framework中,Hashtable是System.Collections命名空间提供的一个容器,用于处理和表现类似key/value的键值对,其中key通常可用来快速查找,同时key是区分大小写;value用于存储对应于key的值。Hashtable中key/value键值对均为object类型,所以Hashtable可以支持任何类型的key/... 阅读全文
posted @ 2007-01-31 23:11 wenanry 阅读(6197) 评论(1) 推荐(0) 编辑
摘要:using System;using System.Collections;using System.Text;public class SamplesHashtable { public static void Main() { // Create and initialize a new Hashtable. Hashtable table = new H... 阅读全文
posted @ 2007-01-31 23:07 wenanry 阅读(267) 评论(0) 推荐(0) 编辑
摘要:注意事项:1 大家应该尽量避免使用二重指针,二重指针很复杂,容易出错,应该适当的应用引用。 2 使用变量时一定要初始化,使用完后应该回收 尤其是以new申请的内存区域或指针。 必须回收 方法:例如: struct HashT * link = new struct HashT; ... 阅读全文
posted @ 2007-01-31 23:04 wenanry 阅读(1411) 评论(0) 推荐(0) 编辑