accoriEpipt
New Member
I have a Dictionary object:\[code\]protected Dictionary<string,string> myDict;\[/code\]I would like to be able to search the dictionary via a key and update the value of that key/value pair.\[code\]if (!myDict.ContainsKey(key)){ myDict.Add(key, value); //if key is not found in the collection add it.}else //if it is found then update it.{ Update[Key].Value with myValue}\[/code\]Is there a way to do the above? How to update the value of a key by checking the key?What is the actual code to match the pseudocode in the else statement?