Contact: aviboots(AT)netvision.net.il
40,026 questions
51,982 answers
573 users
using System; using System.Collections.Generic; public class Program { public static void Main(string[] args) { ISet<string> set = new HashSet<string> {"c#", "vb.net", "c", "c++", "python"}; Console.WriteLine(string.Join(" ", set)); } } /* run: c# vb.net c c++ python */
using System; using System.Collections.Generic; public class Program { public static void Main(string[] args) { HashSet<int> set = new HashSet<int>() { 1, 2, 3, 8, 0, 7 }; Console.WriteLine(string.Join(" ", set)); } } /* run: 1 2 3 8 0 7 */
using System; using System.Collections.Generic; public class Program { public static void Main(string[] args) { HashSet<int> set = new HashSet<int>(); set.Add(1); set.Add(2); set.Add(3); set.Add(0); set.Add(9); set.Add(7); Console.WriteLine(string.Join(" ", set)); } } /* run: 1 2 3 0 9 7 */