How To

How to use fluent interfaces and method chaining in C#
By Tan Lee Published on Jan 06, 2025 498

Fluent interfaces and method chaining are techniques used in programming to improve code readability and simplicity.

How to use ValueTask in C#
By Tan Lee Published on Jan 06, 2025 466

In C#, the standard return type for asynchronous methods is Task.

How to use anonymous types in C#
By Tan Lee Published on Jan 06, 2025 344

In C#, anonymous types allow you to create and instantiate objects with read-only properties without explicitly defining a type beforehand.

How to use const, readonly, and static in C#
By Tan Lee Published on Jan 06, 2025 356

The const, readonly, and static keywords in C# are frequently used but have distinct roles with some similarities that can make their usage confusing.

How to use immutability in C#
By Tan Lee Published on Jan 06, 2025 270

Immutability, a feature in functional programming languages, simplifies writing, testing, and maintaining programs.

How to use closures in C#
By Tan Lee Published on Jan 05, 2025 388

Closures in C# enabled through anonymous methods, lambda expressions, and delegates improve code robustness, efficiency, readability, and maintainability by allowing functions to access non-local variables.

How to use FusionCache in ASP.NET Core
By Tan Lee Published on Jan 05, 2025 755

FusionCache is an open-source hybrid caching solution for ASP.NET Core that combines in-memory and distributed caching while adding advanced features like adaptive caching, eager refresh, and in-memory synchronization.

How to use Task.WhenEach in C#
By Tan Lee Published on Jan 05, 2025 553

The upcoming .NET 9 release introduces the Task.WhenEach method, allowing developers to handle asynchronous tasks more efficiently.

How to use jagged arrays in C#
By Tan Lee Published on Jan 04, 2025 342

Jagged arrays are a type of multi-dimensional array that allows each row to have varying lengths, which can improve performance when working with arrays.

How to use extension methods in C#
By Tan Lee Published on Jan 04, 2025 333

In C#, extension methods allow you to add functionality to existing types without modifying or inheriting from them.

How to use Brotli for response compression in ASP.NET Core
By Tan Lee Published on Jan 04, 2025 575

Using content compression in RESTful services with ASP.NET Core Web API can improve performance by reducing bandwidth usage and speeding up responses.

How to use SignalR in ASP.NET Core
By Tan Lee Published on Jan 04, 2025 592

SignalR for ASP.Net Core is an updated library that enables real-time communication in ASP.NET Core applications, allowing the server to push updates to connected clients immediately without the clients needing to request them.