Search
How to use JsonDocument to read JSON in C#
By Tan Lee Published on Mar 06, 2025 269
The JsonDocument class in C# allows you to read and process JSON data efficiently without needing to deserialize the entire JSON into an object.
Read moreHow to Get and send JSON with HttpClient in C#
By Tan Lee Published on Mar 06, 2025 350
The easiest way to fetch and submit JSON data using HttpClient is through the GetFromJsonAsync() and PostAsJsonAsync() extension methods from the System.Net.Http.Json namespace, as demonstrated below:
Read moreHow to use JsonExtensionData in C#
By Tan Lee Published on Mar 06, 2025 274
The JsonExtensionData attribute (from System.Text.Json) is useful for deserializing properties that don't match your class structure. Without this attribute, any extra JSON fields will be ignored, leading to null properties in the resulting object.
Read moreHow to Deserialize JSON as a stream in C#
By Tan Lee Published on Mar 06, 2025 315
To deserialize JSON as a stream in C#, you can use either System.Text.Json or Newtonsoft.Json.
Read moreHow to use JsonNode in C#
By Tan Lee Published on Mar 06, 2025 288
When you want to handle JSON without creating specific classes for (de)serialization, JsonNode offers a flexible alternative.
Read moreTimeZoneInfo with current UTC offset in C#
By Tan Lee Published on Mar 06, 2025 210
TimeZoneInfo provides the base UTC offset, which can lead to confusion since the offset may vary depending on the date due to daylight saving time.
Read moreHow to Parser a CSV file in C#
By Tan Lee Published on Mar 06, 2025 227
Parsing a CSV file in C# can be done in a few different ways depending on your needs.
Read moreHow to read configuration from appsettings.json in C#
By Tan Lee Published on Mar 06, 2025 462
The appsettings.json file is an efficient way to store and retrieve your application's configuration. It's a JSON file, which makes it much easier to work with than the older XML-based app.config used in earlier versions of .NET.
Read moreHow to deconstruct an object in C#
By Tan Lee Published on Mar 06, 2025 113
Deconstructing an object means assigning its properties to several variables in a single line of code using deconstruction assignment syntax (also known as destructuring or unpacking).
Read moreHow to Convert a Comma-Separated String into a List of Integers in C#
By Tan Lee Published on Mar 06, 2025 264
Let’s consider a scenario where you have a comma-separated string of numbers, such as "5,10,15", and you want to convert it into a list of integers, like [5, 10, 15].
Read moreHow to use ValueTuples in C#
By Tan Lee Published on Jan 03, 2025 224
A Tuple is a data structure consisting of an ordered, fixed-size collection of immutable elements, each of a specific type that cannot be modified.
Read moreHow to use IEnumerable, ICollection, IList, and IQueryable in C#
By Tan Lee Published on Jan 02, 2025 587
C# provides robust support for working with collections of data through various classes and interfaces.
Read moreHow to use OpenAPI in ASP.NET Core
By Tan Lee Published on Dec 31, 2024 315
In ASP.NET Core, you can easily document your HTTP endpoints using OpenAPI support, which includes Swagger UI for a graphical interface.
Read moreSpeeding Up Searches with SearchValues in .NET 8
By Tan Lee Published on Dec 31, 2024 382
With the release of .NET 8, Microsoft introduced the SearchValues class, a new addition that leverages vectorization and hardware acceleration to improve search performance.
Read moreHow to use Dapper with SQLite in ASP.NET Core
By Tan Lee Published on Dec 31, 2024 474
When building .NET and .NET Core applications that rely on databases, developers often seek a lightweight and fast database engine to speed up testing and development.
Read moreHow to convert file data to byte array in C#
By Tan Lee Published on Dec 30, 2024 437
If you're uploading a ZIP file to Azure Blob Storage, you would first need to convert the file into a byte array.
Read moreHow to use Factory Method Pattern in C#
By Tan Lee Published on Feb 16, 2024 757
The Factory Method is a creational design pattern that defines an interface for creating objects in a superclass.
Read moreHow to read Configuration Values from appsettings.json in ASP.NET Core
By Tan Lee Published on Dec 27, 2024 1.03K
To access the values from the configuration file, you need to set up a configuration system in the Startup.cs class.
Read moreHow to prevent flicker in WinForms
By Tan Lee Published on Dec 27, 2024 332
If you often update the content of a WinForms Control, you may encounter a flickering problem, particularly when the data being displayed is large.
Read moreRemote WebDriver in C#
By Tan Lee Published on Dec 27, 2024 393
Selenium allows you to automate browsers on remote computers when a Selenium Grid is set up.
Read moreHow to use Metro Progress Bar in C#
By Tan Lee Published on Jun 08, 2017 12.92K
To use the Metro Progress Bar in a C# Windows Forms application, you typically need a library that provides a modern "Metro-style" UI component.
Read moreMaterio Admin Template
By Tan Lee Published on Nov 13, 2024 435
Materio is a Free Bootstrap 5 HTML Admin Template that stands out as one of the most powerful and comprehensive admin dashboard templates available.
Read moreHow to upload Multiple File in ASP.NET MVC
By Tan Lee Published on Nov 13, 2024 253
In ASP.NET MVC, uploading multiple files can be done easily using the HttpPostedFileBase class.
Read moreMulti-dimensional Array Size in C#
By Tan Lee Published on Nov 10, 2024 283
In C#, multi-dimensional arrays are arrays with more than one dimension. These arrays are declared using a comma-separated list of dimensions in square brackets.
Read moreHow to insert master/details data in EF Code First
By Tan Lee Published on Nov 09, 2024 246
In Entity Framework (EF) Code First, inserting master-detail data involves inserting records into both the "master" and "detail" tables while respecting the relationships between them (such as one-to-many, many-to-one, etc.).
Read moreWhat is Gaming Smartphone? Should you buy a Gaming Phone?
By Tan Lee Published on Sep 08, 2019 2.51K
This article offers insights into gaming smartphones, helping you decide whether purchasing one is the right choice for you.
Read moreHow to use DevExpress Project Converter
By Tan Lee Published on May 28, 2024 3.56K
To use the DevExpress Components Project Converter to update or convert your DevExpress project to a new version, follow these detailed steps.
Read moreHow to display custom string for enum value in C#
By Tan Lee Published on Oct 29, 2024 414
In C#, you can display a custom string for enum values by using the Description attribute from the System.ComponentModel namespace.
Read moreHow to create Message Box in Python
By Tan Lee Published on Oct 22, 2024 207
Creating a message box in Python can be done easily using libraries like tkinter, which is included in the standard library.
Read moreHow to fix laptop can not detect headphones
By Tan Lee Published on Sep 13, 2019 3K
If your laptop isn't detecting headphones on Windows 10, try the following steps to troubleshoot the issue.
Read more