How To

How to retrieve logical drive info in C#
12/25/2024 9:02:56 AM  14

In this post, I'll share a simple method using C# to gather basic information about your computer's logical drives.

How to Work with Serial Port Communication in C#
12/25/2024 8:56:09 AM  33

In this tutorial, we’ll explore the basics of how to perform serial port communication within C# .NET applications.

Serialize and deserialize a multidimensional array to JSON in C#
12/25/2024 4:46:11 AM  34

By default, System.Text.Json does not support serializing or deserializing multidimensional arrays.

The SqlParameterCollection only accepts non-null SqlParameter type objects, not SqlParameter objects
12/25/2024 4:36:41 AM  18

If you're working with Entity Framework Core (EF Core) and encounter the following exception when executing a query with parameters:

How to remove duplicates from a list in C#
12/25/2024 4:35:34 AM  32

Removing duplicates from a list is a common task in programming. The most efficient way to handle it is by iterating through the list and using a data structure that ensures uniqueness, such as a HashSet.

OverflowException: Value was either too large or too small for an int32
12/25/2024 4:34:09 AM  23

When working with integer parsing in C#, one of the most common exceptions that developers encounter is the OverflowException: Value was either too large or too small for an Int32.

How to use LinkedList in C#
12/25/2024 4:00:49 AM  11

In C#, the LinkedList<T> class is a powerful collection designed to handle frequent insertions and removals from both the head and tail of the list efficiently.

How to remove items from a list while iterating in C#
12/25/2024 3:54:03 AM  6

There are two main approaches for iterating through a List<T> and removing items based on a condition.

How to Search for files in a directory in C#
12/25/2024 3:45:32 AM  8

In C#, managing and searching files in a directory is a common task, and Directory.EnumerateFiles() provides a powerful and efficient way to find files that meet specific criteria.

How to get temp folder path in C#
12/25/2024 3:40:59 AM  8

In C#, you can easily access and work with temporary folders and files using the System.IO.Path class.

How to delete a directory in C#
12/25/2024 3:11:57 AM  13

In C#, one of the simplest ways to delete a directory is by using the Directory.Delete() method from the System.IO namespace.

How to set permissions for a directory in C#
12/25/2024 2:54:28 AM  18

When working with files and directories in C#, you may need to set or modify permissions for a specific directory, including its files and subdirectories.