Summery
.NET is a development platform, not a programming language.
It’s a Microsoft platform for building and running applications.
It consists of several parts:
C# - Main programming language
.NET - Development platform
CLR - Runtime that executes .NET code
IL - Intermediate Language generated by compilers
BCL - Base Class Library providing reusable functionality
For example, you write a program in C# - Console.WriteLine("Hello");.
The C# compiler translates it into IL, which is stored in a .NET assembly (.exe or .dll).
The CLR loads the assembly and typically uses JIT compilation to translate IL into native machine instructions.
Even though C# is mostly used with NET framework, there is also F# and Visual Basic .NET which is for exmaple used in Microsoft Office macro creation.
Think of .NET as an ecosystem: languages provide the code, the compiler translates it, and the runtime executes it.
.NET assembly
A .NET assembly is a compiled unit of .NET code. It typically contains:
- IL (Intermediate Language) - instructions generated by the compiler.
- Metadata - information about classes, methods, types and references.
- Manifest - assembly identity, version and dependencies.
The .NET runtime (CLR) executes the IL, typically compiling it into native machine code using JIT compilation.
Can be decompiled using dnSpy, ILSpy or dotPeek - Debuggers, decompilers & disassemblers.
ASP.NET
ASP.NET is Microsoft’s web development framework for building dynamic websites, web applications, and APIs using .NET - Similar to Express.js.
It allows developers to write server-side code, typically in C#, that processes requests and generates responses. You can kinda add it to your code and define it as you do with Python libraries at the top of the script.
Without ASP.NET, C# doesn’t inherently provide a convenient web application framework.