Ahamad Basha NSintro-to-c-net-core.hashnode.dev路Dec 14, 2024Date and Time in C#C# provides a robust and flexible framework for working with dates and times, encapsulated primarily within the System and System.Globalization namespaces. Key Classes and Structures: DateTime Structure: Represents a specific instant in time, combi...timespan
Ahamad Basha NSintro-to-c-net-core.hashnode.dev路Dec 14, 2024Generic collections part 2: Stack and QueueStack A Stack is a linear data structure that follows the Last-In-First-Out (LIFO) principle. It's like a stack of plates: the last plate you put on is the first one you take off. Key Operations: Push: Adds an element to the top of the stack. Pop: ...C#
Ahamad Basha NSintro-to-c-net-core.hashnode.dev路Dec 14, 2024Generic COLLECTIONS part 1This backpack is special because it can hold all sorts of things, like toys, books, or even snacks! You can put things in, take them out, and organize them in different ways. In coding we call it a Collection. Let's understand them one by one. List<T...hash set
Ahamad Basha NSintro-to-c-net-core.hashnode.dev路Dec 13, 2024C# Non-Generic SortedList: A Detailed ExplanationImagine a phonebook. It's a list of people's names (keys) and their corresponding phone numbers (values). The special thing about a phonebook is that it's always sorted alphabetically by the names. This makes it incredibly easy to find someone's numb...sorted list
Ahamad Basha NSintro-to-c-net-core.hashnode.dev路Dec 13, 2024Hash Tables: A Deep Dive into C#Imagine you have a big toy box. You want to store your toys in an organized way, so you decide to put similar toys together. For example, all your cars go in one section, all your dolls in another, and all your blocks in a third. That's kind of how a...OpenAddressing
Ahamad Basha NSintro-to-c-net-core.hashnode.dev路Dec 13, 2024ArrayList: A Dynamic Collection in C#When you are on a buffet, you want to try all dishes, but you feel full after few items, and you wish to have some more space, right? If similar situation happens while coding, don鈥檛 worry we have ArrayList. An ArrayList is a non-generic collection i...C#
Ahamad Basha NSintro-to-c-net-core.hashnode.dev路Dec 12, 2024Default Method of Array1. Array.Sort() 馃Ч: Sorts the elements of an array in ascending order. int[] numbers = { 3, 1, 4, 1, 5, 9 }; Array.Sort(numbers); // numbers will be { 1, 1, 3, 4, 5, 9 } 2. Array.Reverse() 馃攧: Reverses the order of elements in an array. Array.Revers...array
Ahamad Basha NSintro-to-c-net-core.hashnode.dev路Dec 12, 2024Jagged Arrays in C#A jagged array is an array of arrays, where each element can have a different length. This flexibility allows you to create arrays with varying dimensions. int[][] jaggedArray = new int[3][]; // Declares a jagged array with 3 rows // Initialize each...C#
Ahamad Basha NSintro-to-c-net-core.hashnode.dev路Dec 12, 2024Single and Multi-Dimensional Arrays in C#Arrays in C# are a fundamental data structure used to store a collection of elements of the same data type. They provide a convenient way to organize and manipulate data. There are two main types of arrays in C#: 1. Single-Dimensional Arrays 馃搱 A s...single dimensional arrays
Ahamad Basha NSintro-to-c-net-core.hashnode.dev路Dec 12, 2024Collections General OverviewThings become better to work when everything is organized. Same applicable while coding, we want to keep data organized. We can achieve this using Collections C# provides a rich set of collection classes to store and manage groups of objects efficien...non generic