dictionary<string, string> dic1 = new dictionary<string, string> (); Dic1. ADD ("ddd", "123");
Dic1. ADD ("AAA", "123");
Dic1. ADD ("CCC", "123");
Dic1. ADD ("fff", "123");
Dic1. ADD ("Eee", "123");
Dic1. ADD ("BBB", "123");
dictionary<string, string> dic1asc = Dic1. by (o => o.key). ToDictionary (o => o.key, p => p.value);
dictionary<string, string> dic1desc = Dic1. OrderByDescending (o => o.key). ToDictionary (o => o.key, p => p.value);
Dictionary<string, string> DIC1ASC1
= (from D in Dic1
by D.key Ascending
Select D). ToDictionary (k => K.key, v => v.value);
Dictionary<string, string> DIC1DESC2
= (from D in Dic1
by D.key Descending
Select D). ToDictionary (k => K.key, v => v.value);
list<string> list = new list<string> ();
List. ADD ("AAA");
List. ADD ("ddd");
List. ADD ("BBB");
List. ADD ("CCC");
List. ADD ("BBB");
var asclist = list. by (o => o);
var desclist = list. OrderByDescending (o => o);
var ascList1 = (from L in list
by L Ascending
Select L). ToList ();
var descList2 = (from L in list
by L Descending
Select L). ToList ();
String str = "";