RT

解决方案 »

  1.   

    Dictionary[key] = value;
      

  2.   


     Dictionary<string, string> openWith = 
        new Dictionary<string, string>();
                int i=0;             if (openWith .Contains(i)) 
                { 
                    openWith [i] = i; //修改key为i的Value 
                } 
                else 
                { 
                    openWith .Add(i, 0); //添加key为i的记录 
                }
      

  3.   

    或者这样也可以比较简单private void updateDictionaryValue(System.Collections.Dictionary dt,object Key,object updateValue )
            {
                dt[Key] = updateValue;
            }