CSharp examples for Collection:List
Combining two collections with no duplicates
using System;//w w w . ja v a2 s.c o m using System.Collections.Generic; class Program { static void Main(string[] args) { List<string> colors = new List<string> { "red", "orange", "yellow" }; string[] moreColors = { "orange", "yellow", "green", "blue", "violet" }; HashSet<string> combined = new HashSet<string>(colors); combined.UnionWith(moreColors); foreach (string color in combined) { Console.WriteLine(color); } } }