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
Post a Comment