Understanding .NET

C# From Scratch Part 1.2

Welcome to another part of the series C# From Scratch, a course dedicated to teaching you everything you need to know to be productive with the C# programming language.

In the previous part of the series, we installed the tools which we will be using to create and run C# applications. They were .NET and Visual Studio Code. If you missed that part of the series, you can find it here.

In this part of the series, we’ll take a step back to understand what we’ve just installed on our machine — what exactly is .NET?

Understanding .NET

Throughout this course, we will be writing software using the C# programming language. This software is written in human-readable instructions in a text file.

However, a computer can’t read this software and directly execute the instructions. So how can we get our software to execute on a computer?

For C#, there are two steps involved in getting our code to execute on a machine.

First, our C# source code is compiled into instructions that are understood by a tool called the CLR (Common Language Runtime). The result of this compilation is an executable program.

Second, when we execute our program, the CLR translates the instructions in the executable file into machine code that the computer understands and the instructions are executed on the machine.

The C# compiler and the CLR are part of the .NET SDK which you have just installed on your machine.

Different .NETs

There are two different .NET Frameworks available to use for developing software with the C# programming language: .NET and the .NET Framework.

The .NET Framework is a version of .NET that can only be used to write software for Windows machines. This version of .NET has been around since 2001 and is built and maintained by Microsoft.

.NET (also known as .NET Core) is a newer .NET that can be used to create applications that run on various platforms including Mac, Linux, and Windows. This version of .NET is completely open-source and community developed.

In this course, we’ll be using .NET.

If you are starting a new project and you can use .NET, then you probably should.

In some very specific cases, you might have to use the older .NET Framework for example, if there is a feature that you need to use which is only available in the .NET Framework.

What’s Next?

In this part of the series, we learned about the different versions of .NET that are available to build our C# applications with.

In the next part of the series, we’ll take a closer look at what exactly is in .NET and how it is used to create and run C# applications.

Missed a part of the series? You can find an overview of the series and links to all previous parts on the index page.

Automation Engineer, Technology Enthusiast, Freelance/Consulting. Official website: https://www.kb-controls.io/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store