"Item with the same key has already been added" when using index operator to replace a local variabl

When using the indexing operator on a LocalizedString to set a new value for a local variable, I’d expect it to behave the same as a Dictionary<T> instead of throwing an ArgumentException.

Eg.

// If "VariableName" already existed, it should be replaced silently
_locString["VariableName"] = someOtherLocString;

// But this should throw, this `Dictionary<T>`'s .Add() API only allows adding new keys
_locString.Add("VariableName", someOtherLocString);

For now I’m just removing the key before re-adding to change its value, eg.

_locStringEvent.StringReference.Remove("VariableName");
_locStringEvent.StringReference["VariableName"] = newValue;

Ah thanks for the feedback. I’ll get this changed.

Great, thanks!