The Fastest Way to Write Text Files to Disk in C#

A few weeks ago I was tasked with creating a very large CSV file with some dynamic content. I decided that this would be an excellent opportunity to try out some of my C# skills and write the content of the file using a loop. I quickly realized that not all methods of writing files to the hard drive perform the same. In fact, some methods are just plain terrible. I decided to write this article to compare different ways to write text files and evaluate their performance.

Read more

How to Create a Number Guessing Game in C#

In today’s tutorial, we are going to make a number guessing game in C#. We will learn how to generate random numbers, get user input, and decide if the user guesses the correct number. This tutorial will be relatively short compared to some of my other tutorials.

Read more

How to Reverse a String in C#

In today’s tutorial, I am going to show you how to reverse a string. While I know this does not sound impressive, it does give you a look into how you can manipulate strings in the future. By the end of this tutorial, you will be able to split a string up into individual characters and then manipulate them.

Read more

How to Create a Tile Flooring Calculator WPF Application in C#

In my last tutorial, I showed you how to create a simple tax calculator with a GUI using WPF. In this tutorial, we are going to take some of what you learned in that tutorial and add to it when I will show you how to create a tile flooring calculator in C# using WPF. By the end of this tutorial, you will be able to create secondary windows and display them to the user.

Read more

How to Create a Simple Tax Calculator WPF Application in C#

In my last tutorial, I showed you how to create a simple tax calculator console application in C#. As promised, in this tutorial I will show you how to make that same tax calculator with a Graphical User Interface (GUI) and with a few feature enhancements. By the end of this tutorial, you will be able to run your tax calculator and calculate the grand total of a list of items with different tax rates for each item.

Read more