Dim x As Int
x = prefManager.GetString("Background")
colorSettings.AddList2("Background","Plot background",colorMap.Get(x),defGridBkgColor,"",colorMap)
In the first case I would have expected an implicit conversion from string to integer in the .Get method.
In practice the conversion fails and so the key is not found.
In the second case I force the implicit conversion from string to integer and the key lookup succeeds.