Dictionary字典集合的使用
Dictionary<string, string> dic = new Dictionary<string, string>();
            foreach (DataRow r in dt.Rows)
            {
                string str = Convert.ToString(r["strLogisticsType"]);
                if (dic.ContainsKey(str))
                {
                    continue;
                }
                dic.Add(str,str);
            }
            KeyValuePair<string, string> keyPair;
            Dictionary<string, string>.Enumerator dicR = dic.GetEnumerator();
            while (dicR.MoveNext())
            {
                keyPair = dicR.Current;
                _Logistics.Text += keyPair.Key + " ";
            }
                    
                
                
            
        
浙公网安备 33010602011771号