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