Search

How to retrieve logical drive info in C#
By Tan Lee Published on Dec 25, 2024 279

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

Read more
How to Work with Serial Port Communication in C#
By Tan Lee Published on Dec 25, 2024 1.07K

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

Read more
How to remove duplicates from a list in C#
By Tan Lee Published on Dec 25, 2024 509

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.

Read more
OverflowException: Value was either too large or too small for an int32
By Tan Lee Published on Dec 25, 2024 536

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.

Read more
How to use LinkedList in C#
By Tan Lee Published on Dec 25, 2024 277

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

Read more
How to remove items from a list while iterating in C#
By Tan Lee Published on Dec 25, 2024 636

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

Read more
How to Search for files in a directory in C#
By Tan Lee Published on Dec 25, 2024 326

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.

Read more
How to delete a directory in C#
By Tan Lee Published on Dec 25, 2024 437

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

Read more
How to create directories in C#
By Tan Lee Published on Dec 25, 2024 375

In C#, managing directories is made easy with the Directory.CreateDirectory() method from the System.IO namespace.

Read more
How to delete all files in a directory in C#
By Tan Lee Published on Dec 25, 2024 360

In C#, the Directory.EnumerateFiles() method provides an efficient way to retrieve the file paths in a directory, then loop over the file paths and delete each file.

Read more