How to update a value in a Dictionary<K, V>

  • Thread starter Thread starter amir
  • Start date Start date
A

amir

do i have to remove the pair and then reinsert it or can i just update the
value of the dictionary
 
what do you mean just update it? how do i update a value for a certain key?
 
Assuming that the key is in the dictionary,

MyDictionary ["MyCertainKey"] = "Some new value...";
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top