Linq fixed (lookup parameter was inconsistent). You compared the result variable with dictionary value. You have to compare prviously parsed int value with dictionary key.