c# dictionary replace value for key code example Example: dictionary update c# myDictionary[myKey] = myNewValue;