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

rdbms - what exactly the undo information lives in oracle? -

bash - How do you programmatically add a bats test? -

clojure - 'get' replacement that throws exception on not found? -