日期:2014-05-18 浏览次数:20769 次
Dim Ahb As New Hashtable Dim Bhb As New Hashtable Ahb.Add("a", "aaaa") Ahb.Add("b", "bbbb") Ahb.Add("c", "cccc") Ahb.Add("d", "dddd") Bhb.Add("aa", "1111") Bhb.Add("bb", Ahb.Clone) Response.Write("Bhb.Item(0)===" & Bhb("bb")("b").ToString())
System.Collections.Hashtable hash = new System.Collections.Hashtable(); hash.Add("a", "aaaa");
------解决方案--------------------
Hashtable Ahb = new Hashtable();
Hashtable Bhb = new Hashtable();
Ahb.Add("a", "aaaa");
Ahb.Add("b", "bbbb");
Ahb.Add("c", "cccc");
Ahb.Add("d", "dddd");
Bhb.Add("aa", "1111");
Bhb.Add("bb", Ahb.Clone());
Response.Write("Bhb.Item[0]===" + Bhb["bb"]["b"].ToString());
------解决方案--------------------
Hashtable Ahb = new Hashtable(); Hashtable Bhb = new Hashtable(); Ahb.Add("a", "aaaa"); Ahb.Add("b", "bbbb"); Ahb.Add("c", "cccc"); Ahb.Add("d", "dddd"); Bhb.Add("aa", "1111"); Bhb.Add("bb", Ahb.Clone()); Response.Write("Bhb.Item(0)===" + ((Hashtable)Bhb["bb"])["b"].ToString());
------解决方案--------------------
参看1楼写法,哈希表要引用空间的,不过直接打右键添加也是可以的,注意大小写