Master C# - From Beginner to Building Real Apps

Start coding today with hands-on C# tutorials. From your first console app to advanced techniques, build a solid foundation in modern .NET development.

Begin with the basics (variables, loops, methods). Then progress to object-oriented programming, LINQ, async/await, and more. Each tutorial includes practical examples you can run immediately. By the end, you'll confidently build real-world C# applications.

To read a text file in C#, you will use a StreamReader object. In this tutorial, you will learn how to use StreamReader to read the contents of an existing file. ... Read more →

To asynchronously write to a text file in C#, you will use the StreamWriter constructor within an async method. StreamWriter can also be used to write strings to a file synchronously, or to append to an existing file. To use StreamWriter asynchronously, include the following using directives in your ... Read more →

To write to a text file in C#, you will use a StreamWriter object. In this tutorial, you will learn how to use StreamWriter to write a string to a file synchronously. You can also use StreamWriter to append text to an existing file and to write to a ... Read more →

For a given class in C#, you may need different ways to pass arguments to it. You can do this by overloading a constructor. Overloaded constructors enable you to initialize objects of the same class in different ways - for example, by passing in different numbers of initial parameters. ... Read more →

Suppose you want to get the number of days between two dates, or the number of seconds between two times. In C#, you can use the DateTime.Subtract method to compute the difference between dates and times. ... Read more →

You will make a menu-driven program in this tutorial. Using a while loop, you will learn how to add a menu to a C# console application. This technique helps your users navigate your app, and it enables you to create more robust C# programs. ... Read more →