c# - Sort Only One Element Of KeyValuePair inside List<t> -


i have following implementation

public static list<keyvaluepair<int, double>> entries = new list<keyvaluepair<int, double>>(); entries.add(new keyvaluepair<int, double>(j, min));               

for mathematical computation, want sort min value , not j key. how can done? thanks.

edit: using class level variables , tried repeatedly

psolib.entries = psolib.entries.orderby(kvp => kvp.value).tolist(); linechart.datacontext = psolib.entries;  

and values simple don't sorted. did screw?

entries = entries.orderby(kvp => kvp.value).tolist(); 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -