C# ArrayList

C# ArrayList is a non-generic dynamic size collection class. ArrayList class exists in System.Collections namespace. ArrayList are dynamic means we can add any number of items without specifying the size of it. ArrayList vs Array ArrayList and Array looks same. But there are some major differences between them. Differences are: …

C# ArrayList Read More

C# Hashtable

C# Hashtable class is a collection class where we can store data in the key/value pair. Hashtable is not type-safe. Hashtable is not generic and both key and value are based on object type. Hashtable is used to store unique keys data. If we try to assign value to already used key, …

C# Hashtable Read More

C# Convert string to int

In C#, there are there ways for converting string to int. Each way has its own advantages and disadvantages. These ways are: int.Parse method int.Parse method converts string input into integer. It takes the string input and returns int as output. Before using the int.parse, we must sure the string has a valid …

C# Convert string to int Read More

ConcurrentDictionary in C# – Introduction, Examples

ConcurrentDictionary is one of five collection classes introduced in.NET 4.0. It exists in System.Collections.Concurrent namespace. ConcurrentDictionary is a thread-safe collection class to store key-value pairs. ConcurrentDictionary can be used with multiple threads concurrently.  Without ConcurrentDictionary class, if we have to use Dictionary class with multiple threads, then we have to use locks to …

ConcurrentDictionary in C# – Introduction, Examples Read More

ConcurrentQueue in C# – Introduction and Examples

C# ConcurrentQueue is a thread-safe collection class. It is introduced in .NET 4.0 with other concurrent collection classes. It provides a thread-safe First-In-First-Out (FIFO) data structure. You can read more about Queue here. ConcurrentQueue exists in System.Collections.Concurrent namespace ConcurrentQueue is a wrapper around generic Queue class. Queue class also provides FIFO data structure but …

ConcurrentQueue in C# – Introduction and Examples Read More