public override bool Equals(object obj) { bool result; if (obj == null) { result = false; } else if (!(obj is HashMapList)) { result = false; } else { HashMapList hashObjectList = (HashMapList)obj; if (base.Count != hashObjectList.Count) { result = false; } else { for (int i = 0; i < base.Count; i++) { if (!base[i].Equals(hashObjectList[i])) { result = false; return(result); } } result = true; } } return(result); }
public DataTable HashMapListToDataTable(HashMapList list) { if (list == null || list.Count < 1) { return(null); } DataTable dt = new DataTable(); foreach (var key in list[0].Keys) { String key0 = key.ToString(); DataColumn column = new DataColumn(key0); dt.Columns.Add(column); } foreach (var map in list) { DataRow row = dt.NewRow(); foreach (var key in map) { foreach (var key1 in map.Keys) { String key0 = key1.ToString(); row[key0] = map[key0]; } } dt.Rows.Add(row); } return(dt); }
public new IHashMapList GetRange(int index, int count) { System.Collections.Generic.List <IHashMap> range = base.GetRange(index, count); IHashMapList hashObjectList = new HashMapList(count); foreach (IHashMap current in range) { hashObjectList.Add(current); } return(hashObjectList); }