Skip to content

Tag Archives: CSharp-Collections-Namespace

StringDictionary is a specialized collection. It is found in the System.Collections.Specialized namespace. It only allows string keys and string values. It suffers from performance problems.… Read More
StringDictionary.GetEnumerator method is used to return an enumerator that iterates through the string dictionary. Syntax: public virtual System.Collections.IEnumerator GetEnumerator (); Return Value: An IEnumerator that… Read More
ArrayList represents an ordered collection of an object that can be indexed individually. It is basically an alternative to an array. It also allows dynamic… Read More
The BitArray class manages a compact array of bit values, which are represented as Booleans, where true indicates that the bit is on i.e, 1… Read More
StringDictionary.Count property is used to get the number of key/value pairs in the StringDictionary. Syntax: public virtual int Count { get; } Return Value: It… Read More
StringDictionary.ContainsValue(String) method is used to check whether the StringDictionary contains a specific value or not. Syntax: public virtual bool ContainsValue (string value); Here, value is… Read More
StringDictionary.ContainsKey(String) method is used to check whether the StringDictionary contains a specific key or not. Syntax: public virtual bool ContainsKey (string key); Here, key is… Read More
StringDictionary.Add(String, String) method is used to add an entry with the specified key and value into the StringDictionary. Syntax: public virtual void Add (string key,… Read More
StringDictionary.Clear method is used to remove all the entries from the StringDictionary. Syntax: public virtual void Clear (); Exception: This method will give the NotSupportedException… Read More
StringDictionary.CopyTo(Array, Int32) method is used to copy the string dictionary values to a one-dimensional Array instance at the specified index. Syntax: public virtual void CopyTo… Read More
StringDictionary.Remove(String) method is used to remove the entry with the specified key from the string dictionary. Syntax: public virtual void Remove (string key); Here, key… Read More
StringDictionary.IsSynchronized property is used to get a value indicating whether access to the StringDictionary is synchronized (thread-safe). Syntax: public virtual bool IsSynchronized { get; }… Read More
SortedList class is a collection of (key, value) pairs which are sorted according to keys. Those pairs can be accessible by key and as well… Read More
SortedList class is a collection of (key, value) pairs which are sorted according to keys. Those pairs can be accessible by key and as well… Read More
The BitArray class manages a compact array of bit values, which are represented as Booleans, where true indicates that the bit is on i.e, 1… Read More