C# .NET Framework (Basic Architecture and Component Stack)
Last Updated :
31 Jan, 2025
C# (C-Sharp) is a modern, object-oriented programming language developed by Microsoft in 2000. It is a part of the .NET ecosystem and is widely used for building desktop, web, mobile, cloud, and enterprise applications. This is originally tied to the .NET Framework, C# has evolved to be the primary language used across the .NET platform which now supports cross-platform development.
The .NET Framework initially launched in 2002 and it has evolved into a broader and more powerful ecosystem known as .NET 5 and beyond. This platform combines the best of .NET Framework, .NET Core, and Xamarin and it enables the developers to build applications that run on Windows, Linux, and macOS.
Key Components of the .NET Framework
The .NET Framework's basic architecture consists of two key elements:
1. Common Language Runtime (CLR): The Common Language Runtime (CLR) is the core runtime engine of the .NET Framework, responsible for managing the execution of code written in any of the .NET-supported languages, such as C#, F#, and VB.NET. It provides various services, including:
- Memory Management: Automatic memory allocation and garbage collection.
- Code Safety: Ensures type safety and handles security through Code Access Security (CAS).
- Execution Management: Converts Intermediate Language (IL) code into machine code via the Just-In-Time (JIT) compiler.
The CLR enables Cross-Language Interoperability, which allows components written in different languages to work together seamlessly.
2. .NET Framework Class Library (FCL): The .NET Framework Class Library (FCL) is a vast collection of pre-built functions and classes available to developers. The FCL provides a range of namespaces that contain classes for tasks like:
- File I/O
- Networking
- Database access
- Graphical User Interface (GUI) design
Additionally, it includes tools such as the Visual Studio IDE, which simplifies application development, debugging, and testing.
3. Other Key Components:
- Common Type System (CTS): It ensures that types are consistent across different languages within the .NET ecosystem.
- Common Intermediate Language (CIL): This is a low-level language that is compiled from source code and later converted into machine code by the JIT compiler.
- Assemblies: The bundles of code that are versioned and deployed together, providing the essential building blocks of a .NET application.
Evolution of .NET Framework to .NET 5+
Initially the .NET Framework was designed to be Windows-specific but with the introduction of .NET Core (starting from version 1.0) in 2016, Microsoft cross-platform development. .NET Core allowed developers to create applications that could run on Windows, Linux, and macOS.
With the release of .NET 5 in 2020, Microsoft unified .NET Framework, .NET Core, and Xamarin into a single platform, making .NET 5+ the modern, cross-platform successor. This new platform focuses on performance improvements, security, and a rich set of libraries that can be used for various types of applications.
Basic Architecture and Component Stack of .NET Framework
The first three components from the bottom are considered as the basic architecture of .Net framework which came in the year 2005 and after this more components were added by Microsoft in the .Net Framework as following:
Note: The diagram illustrates the architecture of the .NET Framework from version 2.0 (released in 2005) through version 4.5 (released in 2012). But it is important to note that since the introduction of .NET Core in 2016 and the unification into .NET 5+ starting in 2020, the architecture has continued to evolve, with the latest versions (such as .NET 6, .NET 7, and .NET 8) offering enhanced performance, cross-platform support, and a unified development experience. These modern versions of .NET are designed to run on Windows, Linux, and macOS, further advancing the ecosystem in 2025 and beyond.
- CLR (Common Language Runtime): It is a run-time environment that executes the code written in any .NET programming language. .Net framework provides support for many languages like C#, F#, C++, Cobra, Jscript.Net, VB.Net, Oxygene, etc.
- FCL (Framework Class Library) : A large number of class libraries are present in this framework which is known as FCL.
- Types of Applications: Mainly the applications that are built in the .Net framework are divided into the following three categories :
- WinForms: Form–Based applications are considered under this category. In simple terms, we can say client-based applications that read and write the file system come under this category.
- ASP .NET: Web-based applications come under this category. ASP.Net is a framework for the web and it provides an awesome integration of HTML, CSS, and JavaScript which makes it useful to develop web applications, websites, and web services. Web services were added in .Net Framework 2.0 and considered as a part of ASP.NET web applications.
- ADO .NET: It includes the applications that are developed to communicate with the database like MS SQL Server, Oracle, etc. It mainly consists of classes that can be used to connect, retrieve, insert, and delete data.
- WPF (Windows Presentation Foundation): Windows Presentation Foundation (WPF) is a graphical subsystem given by Microsoft that uses DirectX and is used in Windows-based applications for rendering UI (User Interface). WPF was initially released as part of .NET Framework 3.0 in 2006 and was previously known as "Avalon”.
- WCF (Windows Communication Foundation): It is a framework for building connected and service-oriented applications used to transmit data asynchronously from one service endpoint to another service point. It was previously known as the Indigo.
- WF (Windows Workflow Foundation): It is a technology given by Microsoft that provides a platform for building workflows within .Net applications.
- Card Space: It is a Microsoft .NET Framework software client that is designed to let users provide their digital identity to online services in a secure, simple, and trusted way.
- LINQ (Language Integrated Query): It is introduced in .Net framework version 3.5. Basically, it is a query language used to make the query for data sources with VB or C# programming languages.
- Entity Framework: It is an open–source ORM (Object Relational Mapping) based framework that comes into .Net Framework version 3.5. It enables the .Net developer to work with a database using .Net objects. Before the entity framework, .Net developers performed a lot of things related to databases. Like to open a connection to the database, developers have to create a Data Set to fetch or submit the data to the database, convert data from the Data Set to .NET objects, or vice-versa. It creates difficulties for developers and also it was an error-prone process, then "Entity Framework" comes to automate all these database-related activities for the application. So, Entity Framework allows the developers to work at a higher level of abstraction.
Note: REST (Representational State Transfer) and AJAX were added in .Net Framework 3.5 as an extension and services of ASP.NET for enhancing web services of .NET Framework.
Parallel Programming and Performance Enhancements
- Parallel LINQ (Language Integrated Query): It comes in .Net Framework version 4.0 and is also termed PLINQ. It provides a concurrent query execution engine for LINQ. It executes the LINQ in parallel such that it tries to use as much processing power the system on which it is executing.
- TPL (Task Parallel Library): It is a set of public types and APIs. It allows the developers to be more productive by simplifying the process of adding concurrency and parallelism to .Net applications.
- .NET API For Store/UWP Apps: In 2012, Microsoft added some APIs for creating UWP(Universal Windows Platform) apps for Windows using C# or VB.
- Task-Based Asynchronous Model: It is a model used to describe the asynchronous operations and tasks in the .Net Framework.
Similar Reads
Introduction
C# TutorialC# (pronounced "C-sharp") is a modern, versatile, object-oriented programming language developed by Microsoft in 2000 that runs on the .NET Framework. Whether you're creating Windows applications, diving into Unity game development, or working on enterprise solutions, C# is one of the top choices fo
4 min read
Introduction to .NET FrameworkThe .NET Framework is a software development framework developed by Microsoft that provides a runtime environment and a set of libraries and tools for building and running applications on Windows operating systems. The .NET framework is primarily used on Windows, while .NET Core (which evolved into
6 min read
C# .NET Framework (Basic Architecture and Component Stack)C# (C-Sharp) is a modern, object-oriented programming language developed by Microsoft in 2000. It is a part of the .NET ecosystem and is widely used for building desktop, web, mobile, cloud, and enterprise applications. This is originally tied to the .NET Framework, C# has evolved to be the primary
6 min read
C# Hello WorldThe Hello World Program is the most basic program when we dive into a new programming language. This simply prints "Hello World!" on the console. In C#, a basic program consists of the following:A Namespace DeclarationClass Declaration & DefinitionClass Members(like variables, methods, etc.)Main
4 min read
Common Language Runtime (CLR) in C#The Common Language Runtime (CLR) is a component of the Microsoft .NET Framework that manages the execution of .NET applications. It is responsible for loading and executing the code written in various .NET programming languages, including C#, VB.NET, F#, and others.When a C# program is compiled, th
4 min read
Fundamentals
C# IdentifiersIn programming languages, identifiers are used for identification purposes. Or in other words, identifiers are the user-defined name of the program components. In C#, an identifier can be a class name, method name, variable name, or label. Example: public class GFG { static public void Main () { int
2 min read
C# Data TypesData types specify the type of data that a valid C# variable can hold. C# is a strongly typed programming language because in C# each type of data (such as integer, character, float, and so forth) is predefined as part of the programming language and all constants or variables defined for a given pr
7 min read
C# VariablesIn C#, variables are containers used to store data values during program execution. So basically, a Variable is a placeholder of the information which can be changed at runtime. And variables allows to Retrieve and Manipulate the stored information. In Brief Defination: When a user enters a new valu
4 min read
C# LiteralsIn C#, a literal is a fixed value used in a program. These values are directly written into the code and can be used by variables. A literal can be an integer, floating-point number, string, character, boolean, or even null. Example:// Here 100 is a constant/literal.int x = 100; Types of Literals in
5 min read
C# OperatorsIn C#, Operators are special types of symbols which perform operations on variables or values. It is a fundamental part of language which plays an important role in performing different mathematical operations. It takes one or more operands and performs operations to produce a result.Types of Operat
7 min read
C# KeywordsKeywords or Reserved words are the words in a language that are used for some internal process or represent some predefined actions. These words are therefore not allowed to be used as variable names or objects. Doing this will result in a compile-time error.Example:C#// C# Program to illustrate the
5 min read
Control Statements
C# Decision Making (if, if-else, if-else-if ladder, nested if, switch, nested switch)Decision Making in programming is similar to decision making in real life. In programming too, a certain block of code needs to be executed when some condition is fulfilled. A programming language uses control statements to control the flow of execution of program based on certain conditions. These
5 min read
C# Switch StatementIn C#, Switch statement is a multiway branch statement. It provides an efficient way to transfer the execution to different parts of a code based on the value of the expression. The switch expression is of integer type such as int, char, byte, or short, or of an enumeration type, or of string type.
4 min read
C# LoopsLooping in a programming language is a way to execute a statement or a set of statements multiple times, depending on the result of the condition to be evaluated to execute statements. The result condition should be true to execute statements within loops.Types of Loops in C#Loops are mainly divided
4 min read
C# Jump Statements (Break, Continue, Goto, Return and Throw)In C#, Jump statements are used to transfer control from one point to another point in the program due to some specified code while executing the program. In, this article, we will learn to different jump statements available to work in C#.Types of Jump StatementsThere are mainly five keywords in th
4 min read
OOP Concepts
Methods
Arrays
C# ArraysAn array is a group of like-typed variables that are referred to by a common name. And each data item is called an element of the array. The data types of the elements may be any valid data type like char, int, float, etc. and the elements are stored in a contiguous location. Length of the array spe
8 min read
C# Jagged ArraysA jagged array is an array of arrays, where each element in the main array can have a different length. In simpler terms, a jagged array is an array whose elements are themselves arrays. These inner arrays can have different lengths. Can also be mixed with multidimensional arrays. The number of rows
4 min read
C# Array ClassArray class in C# is part of the System namespace and provides methods for creating, searching, and sorting arrays. The Array class is not part of the System.Collections namespace, but it is still considered as a collection because it is based on the IList interface. The Array class is the base clas
7 min read
How to Sort an Array in C# | Array.Sort() Method Set - 1Array.Sort Method in C# is used to sort elements in a one-dimensional array. There are 17 methods in the overload list of this method as follows:Sort<T>(T[]) MethodSort<T>(T[], IComparer<T>) MethodSort<T>(T[], Int32, Int32) MethodSort<T>(T[], Comparison<T>) Method
8 min read
How to find the rank of an array in C#Array.Rank Property is used to get the rank of the Array. Rank is the number of dimensions of an array. For example, 1-D array returns 1, a 2-D array returns 2, and so on. Syntax: public int Rank { get; } Property Value: It returns the rank (number of dimensions) of the Array of type System.Int32. B
2 min read
ArrayList
String
Tuple
Indexers