Help with Dictionary<U, V>
I need help with this exercise, it generates an error in the output. The program you are given defines a metal dictionary, where names are used as keys and their price per 1 gram as values. Take the name and price of the fifth metal as input. Add the 5th pair to the dictionary and write the code to get the message about the most expensive metal in the dictionary. Input example Rhodium 225 Output example The most expensive: Rodio Track The given line int [] prices = metals.Values.ToArray () creates an array with the dictionary values. You must order its elements, and the last element will be the largest. So you should find a way to get the key that has that maximum value in the dictionary. The Keys property gets an indexed collection that contains only the keys contained in the dictionary. This is my code: https://code.sololearn.com/c97Ti7bP2nhh/?ref=app