c# dictionary get max value as keyvaluepair code example Example: c# dictionary get highest key myDictionary.Keys.Max();