.NET Framework
C# is an object-oriented programming language that supports data encapsulation, inheritance, polymorphism, and method
overriding. The C# programming language was developed at Microsoft in the late 1990s, headed by Anders Hejlsberg. It allows
you to build various types of applications, such as web, windows, mobile, and cloud-based applications.
C# has the following features:
ā¢
It allows you to develop both console applications and web applications.
ā¢
It supports garbage collection and automatic memory management.
ā¢
It includes native support for the Component Object Model (COM) and Windows-based applications.
ā¢
In C#, the values of the primitive data types are automatically initialized to zeros, and reference types like objects and
classes are initialized to null.
ā¢
It produces a portable code.
ā¢
Its programs execute in a secure, controlled runtime environment.
ā¢
It supports generics, partial types, and anonymous methods that expand the scope, power, and range of the language.
ā¢
It supports language-integrated query (LINQ) and lambda expressions. LINQ enables you to write database queries in C#
programming while lambda expressions are used in LINQ expressions for efficient coding.
The .NET framework is a collection of tools, technologies, and languages that provides an environment to build and deploy
different types of applications easily. It is a software development framework from Microsoft. The figure below describes the
structure of the .NET framework and its components.
Figure 1. .NET framework structure (Ha rwani, 2015)
ā¢
The operating system controls tasks and manages system resources of the computer. The .NET framework runs on Microsoft
Operating Systems (OS), but there are alternative versions that will work on other OS. The OS manages the hardware and
software resources that support the execution of .NET applications.
ā¢
Common Language Runtime (CLR) is a runtime environment of the .NET framework that manages the execution of the .NET
code, enables debugging and exception handling, and makes programs portable. It converts (or compiles) the source code
into an intermediate language called Microsoft Intermediate Language (MSIL). The compiler called CLR Just-In-Time (JIT)
compiles the MSIL code into native code (machine-language code) before it is executed.
ā¢
The .NET Base Class Library contains the classes and interfaces used for building applications. The classes are organized as
namespaces, and the developers can use them by including these namespaces in their programs. These classes or .NET
objects can be used to build and interact with ASP.NET, Windows Forms, and/or ADO.NET and XML.
ā¢
ADO.NET provides access to relational databases and several data sources such as SQL Server and XML. The XML is the
universal format for data on the Web. It allows developers to easily describe and deliver rich, structured data from any
application in a standard, consistent way.