CA607 - .NET Framework C# (Unit 1)
CA607 - .NET Framework C# (Unit 1)
Digital Notes By
NASHRA JAVED
(nashra@iul.ac.in)
Assistant Professor
Department of Computer Application,
Session 2020-2021
.NET Basics
• The .NET Framework is a framework for developing and implementing software for personal computer, web etc.
• It was designed and is maintained by Microsoft Corporation.
• It came out around the year 2000, even though Microsoft started its development in early 90s.
• .NET has a rich collection of class library (called the Base Class Library) to implement GUI, query, database, web services etc.
• Programs developed with .NET needs a virtual machine to run on a host. This virtual machine is called Common Language Runtime
(CLR).
• Since the compiler doesn’t produce native machine code, and its product is interpreted by the CLR, there’s much security.
• .NET allows using types defined by one .NET language to be used by another under the Common Language Infrastructure (CLI)
specification, for the conforming languages.
• Any language that conforms to the Common Language Infrastructure (CLI) specification of the .NET, can run in the .NET run-time.
• Followings are some .NET languages.
– Visual Basic
– C#
– C++ (CLI version)
– J# (CLI version of Java)
– A# (CLI version of ADA)
– L# (CLI version of LISP)
– IronRuby (CLI version of RUBY)
• Microsoft provides a comprehensive Integrated Development Environment (IDE) for the development and testing of software with
.NET. Some IDEs are as follows
Visual Studio
Visual Web Developer
Visual Basic
Visual C#
Lecture Notes By Ms. Nashra Javed 2
.NET Framework Architecture
Definition:
A programming infrastructure created by Microsoft for building, deploying, and running applications and services that use .NET
technologies, such as desktop applications and Web services.
Code Manager
• Code manager invokes class loader for execution.
• .NET supports two kind of coding
1. Managed Code
2. Unmanaged Code
Managed Code
• The resource, which is with in your application domain is, managed code. The resources that are within domain are
faster.
• The code, which is developed in .NET framework, is known as managed code. This code is directly executed by CLR
with help of managed code execution. Any language that is written in .NET Framework is managed code.
• Managed code uses CLR which in turns looks after your applications by managing memory, handling security,
allowing cross –language debugging, and so on.
JIT (Just-in-Time)
• Just - in - Time (JIT) compiler, which compiles MSIL into native code that is specific to the OS and machine
architecture being targeted. Only at this point can the OS execute the application. The just - in - time part of the name
reflects the fact that MSIL code is only compiled as, and when, it is needed.
• In the past, it was often necessary to compile your code into several applications, each of which targeted a specific
operating system and CPU architecture. Often, this was a form of optimization.
• This is now unnecessary, because JIT compilers (as their name suggests) use MSIL code, which is independent of the
machine, operating system, and CPU. Several JIT compilers exist, each targeting a different architecture, and the
appropriate one will be used to create the native code required.
• The beauty of all this is that it requires a lot less work on your part - in fact, you can forget about system - dependent
details and concentrate on the more interesting functionality of your code.
• JIT are of three types:
1. Pre JIT - It converts all the code in executable code and it is slow
2. Econo JIT - It will convert the called executable code only. But it will convert code every time when a code is
called again.
3. Normal JIT - It will only convert the called code and will store in cache so that it will not require converting
code again. Normal JIT is fast.
For Content
https://www.geeksforgeeks.org/introduction-to-net-framework/
https://dotnet.microsoft.com/learn/dotnet/what-is-dotnet-framework
https://www.c-sharpcorner.com/uploadfile/puranindia/net-framework-and-architecture/
For Images
www.google.com