StringCollection myStrings = new StringCollection(); myStrings.Add("hello"); myStrings.Add("world");
if (myStrings.Contains("hello")) { Console.WriteLine("the string 'hello' exists"); }
myStrings.Remove("hello");The StringCollection class is part of the System.Collections.Specialized package library in C#. This package provides specialized collections of objects that are commonly used in .NET programming.