Chapter 1 introduced .NET concepts and the breadth of applications in which it can be used. Now it’s time to put this knowledge into practice and start writing apps. If you’ve programmed with .NET Framework before, you’ll want to read this chapter, as there are many differences between .NET and Framework. .NET Core developers will find a lot of similarities but may be surprised by the top-level statements.
To install .NET, follow the instructions for your OS at https://dotnet.microsoft.com/download. All you need are a terminal/command line and a text editor. Most of the code in this book will work with .NET 6 or later, with documented exceptions. Choose the version that works best for you. If you’re interested in more information about integrated development environments (IDEs) for .NET, check out appendix B.
As discussed in chapter 1, .NET works in many types of applications. Three types of applications are used in this book: console applications, web applications, and web services. Most of this book’s examples use console applications and web services. Many of the samples will work in any of the three types, so you can use whatever you feel most comfortable with. We’ll start with console applications.