Getting started with SemaphoreSlim in .NET

I. The scenario that SemaphoreSlim can help you solve it Below is a clear explanation that would help you understand the situation that you should use SemaphoreSlim. See the item [1] in the reference for the original post of that explanation. In the kindergarten around the corner they use a SemaphoreSlim to control how many … Continue reading Getting started with SemaphoreSlim in .NET

Getting started with method chaining in C#

I. Why do we need the method chaining mechanism First of all, please see some examples in real-world applications which are using the method of chaining below. // Example 1: var result = Employees.Where(a => e.Name == "Tim Nguyen") .OrderBy(a => e.PhoneNumber == 0123456789) .ToList(); // Example 2: // The code below is to declare … Continue reading Getting started with method chaining in C#