C#

C# CountdownEvent

C# CountdownEvent is a synchronization primitive which unblocks a waiting thread when its receives signal a certain number of times. CountdownEvent is used in fork-join scenarios. As shown in the above diagram, master thread divides its work into 3 parallel tasks. After all parallel tasks are completed, then it joins its …

C# CountdownEvent Read More
C#

C# Barrier

C# Barrier class is synchronization primitives used in .NET threading. Barrier is used in an algorithm which composed of multiple phases.  In this Barrier synchronization, we have multiple threads working on a single algorithm. Algorithm works in phases. All threads must complete phase 1 then they can continue to phase 2. …

C# Barrier Read More
LINQ / C#

LINQ Overview

Welcome to LINQ Tutorials. LINQ provides an uniform and powerful SQL like query language in C#/VB.NET to query different data sources. In the tutorial, we will learn all to basics and advanced LINQ language and how to use it your own projects with some live examples. We will go step by …

LINQ Overview Read More
C# / LINQ

LINQ Introduction

LINQ is an acronym for Language Integrated Query. LINQ is introduced in .NET 3.5. Before LINQ, developers need to use different languages for retrieving and saving different data sources. For example if you want to retrieve data from SQL or Oracle database you must learn some basics of SQL query language, …

LINQ Introduction Read More
LINQ / C#

LINQ Basics

Before we start learning LINQ language, we must learn some basic knowledge of most used concepts in LINQ. Sequence A sequence is any collection object that implements the IEnumerable<> interface. LINQ queries only works with the sequences. In the above example, List<string> has implement the IEnumerable interface and countries is the …

LINQ Basics Read More
LINQ / C#

LINQ Query Operators

LINQ provides more than 50 query operators for different functionalities. Every query operator is an extension method. These operators can be categorized into following one: Operator Category LINQ Query Operators Names Filtering Where, OfType Sorting OrderBy, OrderByDescending, ThenBy, ThenByDescending Set Except, Intersect, Union, Distinct Quantifier All, Any, Contains Projection Select, …

LINQ Query Operators Read More