This may be a simple question, but I can't figure out a simple way of doing this. I currently have a simple dictionary with KeyValuePairs like the following:
<1, 100> <2, 200> <3, -999> <4, 134> <5, -999> <6, 223> <7, 123>
The value's (-999) are an indicator for an error that occurs. What I am trying to do is iterate through the dictionary and for whenever there occurs a -999 use the value for the following key. The result, given the above example, would be:
<1, 100> <2, 200> <3, 134> <4, 134> <5, 223> <6, 223> <7, 123>
Any thoughts would be much appreciated!