How To

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

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 514

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 397

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 427

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 315

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 453

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 877

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 598

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 385

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 387

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 645

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 698

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.