I'm trying to eliminate the duplicate strings from the list with the list.District() and the toDictionary but it doesn't work.
Any recommendation how I can eliminate the duplication code with Linq?
here is my code
[JsonIgnore]
public Dictionary<string, int> SensorValues => InOrderSensorValues
.ToDictionary(
x => x.Split(':')[0].ToUpper(),
x => int.Parse(x.Split(':')[1]));
And then i want to split the words as above