Code2night
  • Home
  • Guest Posts
  • Tutorial
  • Languages
  • Post Blog
  • Tools
    • JSON Beautifier
    • HTML Beautifier
    • XML Beautifier
    • CSS Beautifier
    • JS Beautifier
    • PDF Editor
    • Word Counter
    • Base64 Encode/Decode
    • Diff Checker
    • JSON to CSV
    • Password Generator
  • Register
  • Login
  1. Home
  2. Blogpost

Collections

Date- Dec 09,2023

3022

Collections

Collections means the process of which the objects are handled by your program.it holds a set of classes to have elements in a generalized form.By using collections,you can perform Various operations on objects like the store,search,sort,retrieve, update,delete etc.

Types of collections

There are following types of classes in collection, here are shown below.

System.Collections.Generic Classes

In this classes we use System.Collections.Generic namespace.These Collections are used for type-compatible with the type of collections for items that are stored in generic collection.This collection have set of interfaces and classes. here we show classes that are used in System.Collections.Generic namespace.

List List is used for resized dynamically i.e dynamic array.it is accessed by index and this class represents the list of objects.
LinkedList It is used to fast removing and inserting of elements.it uses enumerators.
Dictionary It is used to store key/value pairs.it used the same functionality that is used in non-generic hashtable class.
Queue It use first-in,first-out list.it's functionality similar to that occur in non-generic queue class.
HashSet It is used to prevent duplication in the collection.it is an collection of the unique elements in unordered form.
SortedList it uses the functionality similar to that occur in non-generic sortedlist class.it is key/value pair of sorted list.
Stack it uses First-in,last-out list.

System.Collections Classes

In this Non-Generic collection we use System.Collections namespace. it is not used for type-compatible with the type of collections for items.It can handle any type of objects.This collection have set of interfaces and classes. here we show classes that are used in System.Collections namespace.

ArrayList ArrayList means size of array is dynamic not fixed.it's size increase and decrease at runtime.
Queue Queue shows first-in,first-out collection of objects.you can use in first-in,first-out access of items.
Hashtable Hashtable shows collection of key/value pairs.it is based on hash code of the key.
Stack stack is used last-in,first-out pattern(LIFO pattern) for input/output.

System.Collections.Concurrent Classes

In this collections multiple threads are accessing the collection simultaneously.it gives several threads-safe collection classes that are used in System.Collections.Concurrent namespace. This collection came in dot net framework version 4 and onwards.

S
Shubham Saini
Programming author at Code2Night โ€” sharing tutorials on ASP.NET, C#, and more.
View all posts โ†’

Comments

Tags

AspNet
C#
programming
AspNet MVC
c programming
AspNet Core
C
software development
tutorial
MVC
memory management
Paypal
coding
coding best practices
data structures
programming tutorial
tutorials
object oriented programming
Slick Slider
StripeNet
Free Download for Youtube Subscribers!

First click on Subscribe Now and then subscribe the channel and come back here.
Then Click on "Verify and Download" button for download link

Subscribe Now | 1760
Download
Support Us....!

Please Subscribe to support us

Thank you for Downloading....!

Please Subscribe to support us

Continue with Downloading
Be a Member
Join Us On Whatsapp Join Us On Facebook
Code2Night

A community platform for sharing programming knowledge, tutorials, and blogs. Learn, write, and grow with developers worldwide.

Panipat, Haryana, India
info@code2night.com
Quick Links
  • Home
  • Blogs
  • Tutorials
  • About Us
  • Contact
  • Privacy Policy
  • Terms & Conditions
  • Guest Posts
Free Dev Tools
  • JSON Beautifier
  • HTML Beautifier
  • CSS Beautifier
  • JS Beautifier
  • Password Generator
  • QR Code Generator
  • Hash Generator
  • Diff Checker
  • Base64 Encode/Decode
  • Word Counter
By Language
© 2026 Code2Night. All Rights Reserved.
Made with for developers  |  Privacy  ยท  Terms
Translate Page