I am trying to modify value in dictionary, but the compiler throws KeyNotFoundException. I\'m sure, I declared that key in dictionary, because I am calling
Dictionary is using the GetHashCode and Equals for key comparisons, so implementing the IComparable interface is not enough. Have a look at this answer, that's exactly what you need.