C# Collections Tutorial With Examples
C# Collections Tutorial With Examples
C# Collections Tutorial With Examples
In arrays, you would have noticed that you need to define the number of elements in an
array beforehand. This had to be done when the array was declared.
But in a collection, you don't need to define the size of the collection beforehand. You can
add elements or even remove elements from the collection at any point of time. This
chapter will focus on how we can work with the different collections available in C#.
Collection Description
ArrayList (/c- The ArrayList collection is similar to the Arrays data type in C#. The
sharp- biggest difference is the dynamic nature of the array list collection.
arraylist.html)
Stack (/c-sharp- The stack is a special case collection which represents a last in first
stack.html) out (LIFO) concept
Queues (/c- The Queue is a special case collection which represents a first in
sharp- first out concept
queue.html)
Hashtable (/c- A hash table is a special collection that is used to store key-value
sharp- items
hashtable.html)
/
Report a Bug
Prev (/c-sharp-interface.html) Next (/c-sharp-arraylist.html)
C# C# C#
C# C# C#
C# Tutorial
10) C# Class and Object (/c-sharp-class-object.html)
(https://www.facebook.com/guru99com/)
(https://twitter.com/guru99com)
(https://www.linkedin.com/company/guru99/)
(https://www.youtube.com/channel/UC19i1XD6k88KqHlET8atqF
(https://forms.aweber.com/form/46/724807646.htm)
About
About Us (/about-us.html)
Advertise with Us (/advertise-us.html)
Write For Us (/become-an-instructor.html)
Contact Us (/contact-us.html)
Career Suggestion
SAP Career Suggestion Tool (/best-sap-
module.html)
Software Testing as a Career (/software-testing-
career-complete-guide.html)
Interesting
eBook (/ebook-pdf.html)
Blog (/blog/)
Quiz (/tests.html)
SAP eBook (/sap-ebook-pdf.html)
/
Execute online
Execute Java Online (/try-java-editor.html)
Execute Javascript (/execute-javascript-online.html)
Execute HTML (/execute-html-online.html)
Execute Python (/execute-python-online.html)