KB Controls is reader-supported. When you buy through links on our site, we may earn an affiliate commission. Read more in our disclaimer
C# From Scratch Part 1.0. In this post, we get an introduction to .NET and the major components that make up .NET.
Welcome to another edition of C# From Scratch, a course dedicated to teaching you everything you need to know to be productive with C#. If you’re new here, head over to the index to see all parts of the series.
Throughout this course, we will create applications using the C# programming language.
To run the applications that we create, we need a runtime. We need a runtime because the processor in a computer cannot understand instructions written in C# natively.
The runtime is responsible for converting the C# code that we write into instructions that are understood by the processor in the machine that is running our application.
For C#, that runtime is called .NET.
There are two versions of .NET currently available. They are the .NET Framework and .NET.
The .NET Framework has been around since 2001 and comes pre-installed on most Windows machines. It is written and supported by Microsoft and can be used to create Windows-only applications.
In contrast, .NET is a newer framework that is open-source and used to create cross-platform applications — that is applications that run on machines running Windows, Linux, and macOS.
For most new projects, you will use .NET and this course focuses exclusively on .NET.
So what exactly is .NET and what does it do?
At a high level, .NET has is made up of two major components. They are the Common Language Runtime, or CLR, and the Framework Class Library, or FCL.
The CLR provides a space on a machine to run your program. It is the CLR that brings your application to life, manages memory for your application, and translates your code into instructions for the processor on the machine where it is running.
The FCL provides a library of code that is already written and tested by other developers that you can use in your application. You can use code from the FCL to perform common actions such as opening a file or communicating across a network.
In this course, we will be using parts of the FCL to speed up the development of our application and the CLR to run the applications that we write.
In this part of the series, we had a brief introduction to .NET, the runtime and framework that we use to build C# applications.
In the next part of the series, we will install .NET on our machines and look at how we can use .NET to create and run applications written in C#.
In this post, we learn how to debug a C# .NET Console application using the Console messages and Visual Studio Code's debugger. We also learn how to use conditional statements to avoid exceptional situations.
In this part of the series, we learn how to add interactivity to our application. Along the way, we will learn about methods, arrays, and string manipulation in C#.