window.ENTITIES={'/api/snippets/cs/c%23%20add%20list%20into%20hashset':[{"result":true,"message":null,"batch":{"type":"cs","name":"c# add list into hashset","items":[{"id":"1Xgagj","type":"cs","name":"c# add List into HashSet","content":"List letters = new List { \"A\", \"B\", \"C\" };\n\nHashSet alphabet = new HashSet(letters);","source":"https://dirask.com/posts/C-NET-add-List-into-HashSet-DKqM7j","author":{"id":"z0mNJD","name":"Walter","avatar":"1629130033631__z0mNJD__w40px_h40px.jpg","points":586,"role":"BASIC"},"creationTime":1645815196000,"updateTime":null,"removalTime":null},{"id":"DlVMkj","type":"cs","name":"c# add List into HashSet","content":"using System;\nusing System.Collections.Generic;\n\npublic class Program\n{\n public static void Main()\n {\n List letters = new List { \"A\", \"B\", \"C\" };\n\n HashSet alphabet = new HashSet(letters);\n\n foreach (string letter in alphabet)\n Console.WriteLine(letter);\n }\n}\n\n// Output:\n// A\n// B\n// C","source":"https://dirask.com/posts/C-NET-add-List-into-HashSet-DKqM7j","author":{"id":"vaGBxD","name":"Amir-Hashempur","avatar":"1629030391555__vaGBxD__w40px_h40px.png","points":607,"role":"BASIC"},"creationTime":1645815198000,"updateTime":null,"removalTime":null},{"id":"D7Rqo1","type":"cs","name":"c# add List into HashSet","content":"using System;\nusing System.Collections.Generic;\n\npublic class Program\n{\n public static void Main()\n {\n List letters = new List { \"A\", \"B\", \"C\" };\n\n HashSet alphabet = new HashSet();\n\n alphabet.UnionWith(letters);\n\n foreach (string letter in alphabet)\n Console.WriteLine(letter);\n }\n}\n\n// Output:\n// A\n// B\n// C","source":"https://dirask.com/posts/C-NET-add-List-into-HashSet-DKqM7j","author":{"id":"1DqRAa","name":"Aston-Freeman","avatar":"1629030392665__1DqRAa__w40px_h40px.png","points":787,"role":"BASIC"},"creationTime":1645815199000,"updateTime":null,"removalTime":null}]}}]};