using System.Collections; ArrayList list = new ArrayList(); list.Add("apple"); list.Add("banana"); list.Add("cherry"); list.Remove("banana");
using System.Collections.Generic; Dictionarydict = new Dictionary (); dict.Add(1, "apple"); dict.Add(2, "banana"); dict.Add(3, "cherry"); dict.Remove(2);
using System.Collections; Queue queue = new Queue(); queue.Enqueue("apple"); queue.Enqueue("banana"); queue.Enqueue("cherry"); queue.Dequeue();
using System.Collections.Generic; HashSetIn conclusion, the C# Collection is a powerful package library that provides a wide range of collections for developers to use. The library is essential while working with data structures in C#, and it is impressive how optimized these collections are.set = new HashSet (); set.Add("apple"); set.Add("banana"); set.Add("cherry"); set.Remove("banana");