ArrayList al = new ArrayList(); for (int i = 0; i < ListBox1.Items.Count; i++) { al.Add(ListBox1.Items[i].ToString()); } for (int i = 0; i < ListBox2.Items.Count; i++) { al.Add(ListBox2.Items[i].ToString()); } al.Sort(); for (int i = 0; i < al.Count; i++) { ListBox3.Items.Add(al[i].ToString()); }
IList<int> List1 = new List<int>() { 5, 7, 1, 4 }; IList<int> List2 = new List<int>() { 3, 11, 9, 2 }; IList<int> Result = List1.Union(List2).OrderBy(p => p).ToList<int>();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)