Skip to content

Tag Archives: CSharp-Collections-Namespace

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.IndexOfKey(Object) Method is used to get the zero-based index of the specified key in a SortedList object. Syntax: public virtual int IndexOfKey (object key); Here,… Read More
SortedList.IndexOfValue(Object) Method is used to get the zero-based index of the first occurrence of the specified value in a SortedList object. Syntax: public virtual int… Read More
SortedList.GetKeyList Method is used to get the list of keys in a SortedList object. Syntax: public virtual System.Collections.IList GetKeyList (); Return Value: It returns an… Read More
SortedList.TrimToSize Method is used to set the capacity to the actual number of elements in a SortedList object.Syntax:   public virtual void TrimToSize (); Exception: This… Read More
SortedList.GetValueList Method is used to get the list of keys in a SortedList object. Syntax: public virtual System.Collections.IList GetValueList (); Return Value: It returns an… Read More
SortedList.Contains(Object) Method is used to check whether a SortedList object contains a specific key. Syntax: public virtual bool Contains (object key); Here, key is the… Read More
SortedList.GetEnumerator Method is used to an IDictionaryEnumerator object that iterates through a SortedList object. Syntax: public virtual System.Collections.IDictionaryEnumerator GetEnumerator (); Return Value: This method returns… Read More
SortedList.GetByIndex(Int32) Method is used to get the value at the specified index of a SortedList object. Syntax: public virtual object GetByIndex (int index); Here index… Read More
SortedList.CopyTo(Array, Int32) Method is used to copy SortedList elements to a one-dimensional Array object, starting at the specified index in the array. Syntax: public virtual… Read More
SortedList.GetKey(Int32) Method is used to get the key at the specified index of a SortedList object. Syntax: public virtual object GetKey (int index); Here, index… Read More
ArrayList.IsSynchronized Property is used to get a value which indicate whether access to the ArrayList is synchronized (thread safe). Syntax: public virtual bool IsSynchronized {… Read More
ArrayList.GetEnumerator(Int32, Int32) method is used to get an enumerator for a range of elements in the ArrayList. Syntax: public virtual System.Collections.IEnumerator GetEnumerator (int index, int… Read More
ArrayList.Item[Int32] Property is used to get or set the element at the specified index in ArrayList. Syntax: public virtual object this[int index] { get; set;… Read More
ArrayList.GetEnumerator Method is used to get an enumerator for the entire ArrayList. Syntax: public virtual System.Collections.IEnumerator GetEnumerator (); Return Value: It returns an IEnumerator for… Read More

Start Your Coding Journey Now!