How To

Implementing HTTP Timeout Retries with Polly and IHttpClientBuilder
1/9/2025 3:10:38 AM  226

Polly's retry functionality combined with IHttpClientBuilder provides an elegant solution to configure retry logic at the application startup.

Creating Dynamic Arrays and Lists with Dynamic and ExpandoObject in C#
1/9/2025 3:01:32 AM  292

In this example, we demonstrate creating a dynamic list where the number of objects is not known in advance.

Converting One JSON to Another in C# Using Newtonsoft and Dynamic ExpandoObject
1/9/2025 2:58:17 AM  131

The task of transforming one JSON format into another is quite common.

Convert array of objects into a DataTable in C#
1/9/2025 2:47:40 AM  130

This extension method allows you to easily convert an array of objects into a DataTable, which can be used for SQL insert operations.

‘SHA256Managed’ is obsolete: ‘Derived cryptographic types are obsolete
1/9/2025 2:43:01 AM  131

Warning SYSLIB0021 'SHA512Managed' is obsolete: 'Derived cryptographic types are obsolete. Use the Create method on the base type instead.'

How to Calculate Week Number from DateTime in C#
1/9/2025 2:37:15 AM  137

Calculating the week number is more complex than it initially seems.

Using HttpClient with Sync and Async in C#
1/9/2025 2:27:13 AM  249

The System.Net.Http.HttpClient() provides a robust HTTP client, but using it can be a challenge, especially if you're not familiar with asynchronous programming like I wasn't.

Unable to read data from the transport connection: The connection was closed
1/9/2025 2:23:09 AM  94

If you get an error when attempting to retrieve an image via a WebRequest, the error message is shown below.

HttpClient POST or PUT Json with content type application/json
1/9/2025 2:17:07 AM  119

The HttpClient is a modern and flexible way to interact with URLs, whether you're retrieving data or sending it.

How to use HttpClient and IHttpClientFactory in .NET Core
1/9/2025 2:13:05 AM  226

When working with APIs in C#, the HttpClient class is essential for making HTTP requests such as GET, PUT, POST, or DELETE.

How to Get Total Physical RAM in C#
1/8/2025 9:55:07 AM  194

Retrieving the total installed physical memory (RAM) on the system is straightforward.

How to handle 404 errors in ASP.NET Core
1/8/2025 4:41:06 AM  180

ASP.NET Core MVC is a framework for building cross-platform, scalable web applications and APIs using the Model-View-Controller pattern.