How To
How to use ValueTask in C#
By Tan Lee Published on Jan 06, 2025 326
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 198
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 238
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 169
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 216
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 385
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 357
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 242
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 226
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 430
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 402
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.
How to use the Dapper ORM in ASP.NET Core
By Tan Lee Published on Jan 04, 2025 224
Dapper is an open-source, lightweight "micro ORM" that simplifies data access in applications. It supports various databases like SQL Server, MySQL, SQLite, SQL CE, and Firebird, offering high performance while maintaining ease of use.