Archives for C# - Page 2
Introducing File Scoped Types in C# 11
Since the evaluation of C#, we have seen many access modifiers introduced, and similarly, in C# 11, file-scoped type is a new access modifier mainly designed for code generator authors where…
C# code performance improvement with Span<T> Type
A new structure Span<T> was introduced since C# The main goal of it is to avoid allocating new objects on heap memory when working with the contiguous region of arbitrary memory requirements. …
Understanding Task vs ValueTask
These days most of the Interfaces we are seeing with methods have a return type as ValueTask. So, through this article, we are going to understand What is ValueTask? How…
Understanding Thread Starvation in .NET Core Applications
Most of the applications will be facing a performance issue while scaling and this might be due to thread starvation. Before getting into the thread starvation problem, we need to…
Working with Async/Await/Task keywords in depth
Modern systems are coming more powerful with multiple processors. Similarly, the modern server application development also improved to leverage the host CPU power for processing multiple requests in parallel to…
Working with Smarter Enums in C#
Enum means enumeration , mentioning things one by one, and enum type is a special data type that enables a variable to be a set of predefined constants. Below is…
Consume OData feed with C# Client Application
Introduction OData represents Open Data Protocol is an OASIS standard initiated by Microsoft in the year 2007. This defines the best practices for the consumption of data and building with…
Understanding Semaphore in .NET Core
Semaphore class in is a thin wrapper around the Win32 Semaphore object. This is used to controls access to a resource or pool of resources concurrently. SemaphoreSlim class is lightweight…
Implementing Dependency Injection in .NET Core Console Applications
Before reading this article, readers should have a basic understanding of Dependency Injection as well as .NET Core. In general, when we create a new .NET core web applications, the…
How to change Foreground Color of Text in Console
As we know in .NET Core all types of applications will run on Console based and in some situations like to identify monitoring different category level debug information it would…




