Articles → CSHARP → Frozen Collection In C#

Frozen Collection In C#






Purpose







Example


using System.Collections.Frozen; 
 
List<int> normalList = new List<int> { 1, 2, 3 };
FrozenSet<int> frozenSet = normalList.ToFrozenSet();
 
foreach(int item in frozenSet)
        Console.WriteLine("Item is:"+ item);



Output


Picture showing the output of frozen collection in C#





Posted By  -  Karan Gupta
 
Posted On  -  Friday, December 8, 2023

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250