C# Hashtable vs Dictionary vs HashSet

A Hashtable, Dictionary, and HashSet are all data structures that store and retrieve data based on keys. However, there are some important differences between them.

csharp-hashtable-vs-dictionary-vs-hashset
Difference-between-Hashtable, Dictionary-and-HashSet

Read more >>

C# Hashtable with example – How to use and when to use?

In this blog post, we will take a deep dive into C# hashtables, explaining what they are, how they work, and how to use them effectively in our C# code.

We will also cover some common scenarios where hashtables can be particularly useful, as well as some tips and best practices for working with them. By the end of this post, you should have a solid understanding of hashtables and how to leverage their power in your C# projects.

csharp-hashtable-class

Read more >>

C# Stack Class With Push And Pop Examples

Stack in C# represents a last-in, first-out (LIFO) collection of objects. It is useful when you need last-in, first-out access to elements. Adding an element to the stack is called a push operation, and removing an element from the stack is called a pop operation.

A Stack is a collection that can be both generic and non-generic. The generic stack is defined in the System.Collections.Generic namespace. A non-generic stack, on the other hand, is defined under System.Collections namespace. In this post, we will discuss a non-generic type stack.

C# Stack with Push and Pop Examples
C# Stack with Push and Pop operation

Read more >>

C# Hashtable vs Dictionary: When should you use a Hashtable or a Dictionary?

“In C#, a hashtable is a non-generic collection that can store key/value pairs of any data type. On the other hand, A dictionary is a generic collection that can store key/value pairs of specific data types.”

In this article, we will learn the differences between the Hashtable and Dictionary with examples.

C# Hashtable vs Dictionary
C# Hashtable vs Dictionary

Read more >>

C# Collections – Understanding collections in C# with [Examples]

Collections in C#
C# Collections types

Collections in C#

A collection in C# is a class that represents a group of objects. Collections can be used to perform various operations on objects, such as storing, updating, deleting, retrieving, searching, and sorting.

Collections are defined in the System.Collections namespace. They are a predefined set of classes for storing multiple items in a single unit.

Read more >>