SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Inside .Net Framework




 By Prof. Sheetal R. Uplenchwar
CLR
 The Common Language Runtime (CLR) is a special run
  time environment that provides the underlying infrastructure
  for Microsoft's .NET framework.
 This runtime is where the source code of an application is
  compiled into an intermediate language called CIL (Common
  Intermediate Language), originally known as MSIL (Microsoft
  Intermediate Language).
 When the program is then run, the CIL code is translated into
  the native code of the operating system using a just-in-time
  (JIT) compiler.
 This intermediate language is used to keep the environment
  platform-neutral and as a result, supports all .NET languages
  such as C# or VB.NET
Advantages
 Portability
    Using an intermediate language instead of compiling straight to
      native code requires n + m translators instead of n*m translators
      to implement it in n languages on m platforms.
 Security
    The high level intermediate code is more ready for deployment
      and runtime enforcement of security.
 Interoperability
    Every major .NET language supports CLR and all get compiled
      to CIL. In that intermediate language, implementation of services
      such as security and garbage collection are the same.
 This allows one library or application of one .NET language to
  inherit implementations from classes written in another .NET
  language.
 This cuts down on the redundant code developers would have to
  write to make a system work in multiple languages, allowing for
  multi-language system designs and implementations.
 Additionally, to keep full component interoperability, the runtime
  incorporates all metadata into the component package itself,
  essentially making it self-describing.
 The main advantage of the .NET Framework is the
  interoperability between different languages. As all the
  Microsoft .NET languages share the same common runtime
  language, they all work well together. For example, you can use
  an object written in C# from Visual Basic.NET. The same applies
  for all the other Microsoft .NET languages
 Application related advantages
  Automated Garbage Collection
  Support for explicitly free threading, which
   allows for the creation of multi-threaded,
   scalable applications.
  Support for uniform exception handling
  Use of delegate functions instead of function
   pointers for increased type safety and security.
MSIL
 VB.Net compiles code which is processor
  independent.
 It is portable to n no of platforms.
 This MSIL is then given as input to JIT
  Compilers which converts it into
  native(machine )code.
 At the time of generation of MSIL code all
  metadata(methods, properties, events,
  data types) gets created.
JIT Compilers
 Microsoft provides a set of JIT compilers
  for each supported platform.
 These compilers compile MSIL code into
  native machine code.
 Unlike traditional compilers JIT doesn’t
  compile the full class file in one shot.
 Compilation is done on function basis or
  file basis.
 The high level programming languages that need to be
  compiled require a runtime, so that the architecture on which
  the language runs is provided with details on how to execute
  its code.
 All the programming languages use its corresponding runtime
  to run the application. For example, to run an application
  developed using Visual Basic, the computer on which the
  application will be run must be installed with the Visual Basic
  runtime.
 The Visual Basic runtime can run only the applications
  developed with Visual Basic and not the ones developed with
  any other programming language like Java.
 In the .NET Framework, all the
  Microsoft .NET languages use a common
  language runtime, which solves the
  problem of installing separate runtime for
  each of the programming languages.
 Microsoft .NET Common Language
  Runtime installed on a computer can run
  any language that is Microsoft .NET
  compatible.
 When you compile a Microsoft.NET
  language, the complier generates code
  written in the Microsoft Intermediate
  Language (MSIL). MSIL is a set of
  instructions that can quickly be translated into
  native code.
 A Microsoft.NET application can be run only
  after the MSIL code is translated into native
  machine code. In .NET Framework, the
  intermediate language is complied "just in
  time" (JIT) into native code when the
  application or component is run instead of
  compiling the application at development
  time.
Compilation
                                            Execution




              Compilation & Execution Cycle of .Net application
Types of JIT
 Pre-JIT :
    Per-JIT compiler compiles source code into native code in a
     single compilation cycle.

 Econo- JIT: Econo-
    JIT compiles methods that are called at runtime. However,
     these compiled methods are discarded when they’re not
     required.

 JIT (Normal JIT) –
    They’re called “JIT” or “Normal JIT”. Normal JIT only compiles
     the methods which are called at runtime.
    These methods are compiled the first time they’re called and
     then they’re stored in cache. When the same methods are
     called again, the compilation code from cache is used for
     execution.
Managed Code
 Managed Code is what Visual Basic .NET and C#
  compilers create.
 It compiles to Intermediate Language (IL), not to
  machine code that could run directly on your
  computer.
 The IL is kept in a file called an assembly, along
  with metadata that describes the classes,
  methods, and attributes (such as security
  requirements) of the code
 This assembly is the one-stop-shopping unit of
  deployment in the .NET world.
 You copy it to another server to deploy the
  assembly there—and often that copying is the only
  step required in the deployment.
 Managed code runs in the Common Language
  Runtime. The runtime offers a wide variety of
  services to your running code.
 In the usual course of events, it first loads and
  verifies the assembly to make sure the IL is okay.
 Then, just in time, as methods are called, the
  runtime arranges for them to be compiled to
  machine code suitable for the machine the
  assembly is running on, and caches this machine
  code to be used the next time the method is
  called. (This is called Just In Time, or JIT
  compiling, or often just Jitting.)
 As the assembly runs, the runtime continues to
  provide services such as security, memory
  management, threading, and the like. The
  application is managed by the runtime
Unmanaged code
 It is what you use to make before Visual Studio
  .NET 2002 was released.
 Visual Basic 6, Visual C++ 6, heck, even that 15-
  year old C compiler produced unmanaged code.
 It compiled directly to machine code that ran on
  the machine where you compiled it—and on other
  machines as long as they had the same chip, or
  nearly the same.
 It didn't get services such as security or memory
  management from an invisible runtime; it got them
  from the operating system, usually by calling an
  API provided in the Windows SDK.
System Types
 System class library
 .Net Framework Class Library
  It is a library of classes, interfaces and value
   types .
  It optimizes the development process, provides
   access to system functionality .
  It is designed to be as a foundation on which
   .Net framework applications, components and
   controls are built.
 FCL is an integral component of the .NET framework.
 It consists of object oriented collection of reusable
  classes that can be used to develop command line, GUI,
  web applications etc.
 It is designed into a hierarchical tree structure & divided
  into namespace.
 Before .Net class framework, each programming
  required its own class libraries.
 All .Net languages share the .Net class framework
  requiring no special language specific libraries.
 Syntax used to perform the task between .Net languages
  looks the same as the same namespace & parameters is
  to be used.
 The .Net framework class library is divided into 2 parts
    Base class library
    Framework class library.
    Base class library
   It includes a small subset of the entire class library & is the core
     set of classes that serve as the basic API of the common
     language runtime.
   The classes in mscorlib.dll , system.dll & system.core.dll are
     consiered as part of BCL.
 Framework class library
    It is a superset of the BCL classes & refers to the entire class
     library that ships with .Net framework.
    It includes winforms, ADO.Net, ASP.Net etc.
Namespaces in vb.net
 System: Includes essential classes and base classes for commonly
  used     data   types,     events,   exceptions   and     so    on
  System.Collections: Includes classes and interfaces that define
  various collection of objects such as list, queues,
  hash                tables,               arrays,              etc
  System.Data: Includes classes which lets us handle data from data
  sources
  System.Data.OleDb: Includes classes that support the OLEDB .NET
  provider
  System.Data.SqlClient: Includes classes that support the SQL
  Server                        .NET                        provider
  System.Diagnostics: Includes classes that allow to debug our
  application    and       to     step     through     our     code
  System.Drawing:     Provides    access    to   drawing    methods
 System.Globalization: Includes classes that specify culture-related
  information
  System.IO: Includes classes for data access with Files
  System.Net: Provides interface to protocols used on the internet
  System.Reflection: Includes classes and interfaces that return
  information     about      types,      methods       and      fields
  System.Security: Includes classes to support the structure of
  common         language        runtime       security       system
  System.Threading: Includes classes and interfaces to support
  multithreaded                                          applications
  System.Web: Includes classes and interfaces that support browser-
  server                                              communication
  System.Web.Services: Includes classes that let us build and use
  Web                                                       Services
  System.Windows.Forms: Includes classes for creating Windows
  based                                                        forms
  System.XML: Includes classes for XML support
System.object class
 It is the base class of all classes in the .Net framework.
 It is the root of the type hierarchy.
  Name                                 Description

                                       Determines whether the specified
  Equals(Object)
                                       Object is equal to the current Object.



                                       Determines whether the specified
  Equals(Object, Object)
                                       object instances are considered equal.



                                       Allows an object to try to free
                                       resources and perform other cleanup
  Finalize
                                       operations before it is reclaimed by
                                       garbage collection.
Serves as a hash function for a
GetHashCode
                  particular type.


GetType           Gets the Type of the current instance.


                  Creates a shallow copy of the current
MemberwiseClone
                  Object.

                  Determines whether the specified
ReferenceEquals   Object instances are the same
                  instance.

                  Returns a string that represents the
ToString
                  current object.
Common type system
 With common type system all data types are provided as objects in
  the System.object class.
 This class is accessible by all .Net programming languages &
  enforced by CLR.
 Also previously type conversions needed to be performed every
  time when data was exchanged.
 With the CTS, it is no longer necessary to cast data types between
  assemblies that are written in different languages.
 CTS provides a new standard for .Net assemblies called as type
  safe compatibility.
 To achieve type safe compatibility, some languages have to adjust
  their data type.
 Language interoperability is achieved with the help of CTS.
 Same data type is available in all .Net compatible languages.
Classification of CTS Types
 Value types
    It directly contain the data that you assign them.
    Value types are fixed in size.
    Actual values of data are stored in stack.
    If you assign a value of a variable to another it will create two
     copies.
    All primitive data type except string and object are example of
     value types. struct and enum are value type.
 Reference type
    Reference types are not fixed in size.
    It directly do not contain any data.
    It point to a memory location that contains the actual data.
    They are maintained in system managed heap but it also uses
     stack to store reference of heap.
 Two primitive types (string and object) and non-primitive data
  types (class, interface & delegate) are examples of reference
  type.
Basic Value types
VB Keyword   Bytes   .NET type   Description
Byte         1       Byte        0-255
SByte        1       SByte       -128 to 127
Short        2       Int16       -32,768 to
                                 +32,767
UShort       2       UInt16      0 to 65535
Integer      4       Int32       -2,147,483,648
                                 to +
                                 2,147,483,647
UInteger     5       UInt32      0 to
                                 4,294,967,295
Long         8       Int64       -9,223,372,036,
                                 854,775,808 to
                                 +9,223,372,036
                                 ,854,775,807
ULong    8   UInt64   0 to
                      +18,446,744,
                      073,709,551,
                      615

Single   4   Single   A non integer
                      number with
                      approximately
                      7 significant
                      digits

Double   8   Double   A non integer
                      number with
                      approximately
                      14 significant
                      digits
Decimal   16   Decimal   A non integer
                         number with
                         approximately
                         28 significant
                         digits (integer
                         and fraction)
                         that can
                         represent values
                         up to 79,228 X
                         1024
Char      2    Char      A single Unicode
                         character
Boolean   1    Boolean   A True or False
                         value

Weitere ähnliche Inhalte

Was ist angesagt?

Dotnet interview qa
Dotnet interview qaDotnet interview qa
Dotnet interview qaabcxyzqaz
 
.Net overview|Introduction Of .net
.Net overview|Introduction Of .net.Net overview|Introduction Of .net
.Net overview|Introduction Of .netpinky singh
 
.Net framework components by naveen kumar veligeti
.Net framework components by naveen kumar veligeti.Net framework components by naveen kumar veligeti
.Net framework components by naveen kumar veligetiNaveen Kumar Veligeti
 
.Net platform an understanding
.Net platform an understanding.Net platform an understanding
.Net platform an understandingBinu Bhasuran
 
Java vs .net
Java vs .netJava vs .net
Java vs .netTech_MX
 
.Net framework
.Net framework.Net framework
.Net frameworkArun Pal
 
Introduction to ,NET Framework
Introduction to ,NET FrameworkIntroduction to ,NET Framework
Introduction to ,NET FrameworkANURAG SINGH
 
Introduction to .net FrameWork by QuontraSolutions
Introduction to .net FrameWork by QuontraSolutionsIntroduction to .net FrameWork by QuontraSolutions
Introduction to .net FrameWork by QuontraSolutionsQuontra Solutions
 
Microsoft dot net framework
Microsoft dot net frameworkMicrosoft dot net framework
Microsoft dot net frameworkAshish Verma
 
.Net Framwork Architecture And components
.Net Framwork Architecture And components.Net Framwork Architecture And components
.Net Framwork Architecture And componentssyedArr
 
.Net framework
.Net framework.Net framework
.Net frameworkViv EK
 
.net CLR
.net CLR.net CLR
.net CLRDevTalk
 
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...yazad dumasia
 
Introduction to .NET by QuontraSolutions
Introduction to .NET by QuontraSolutionsIntroduction to .NET by QuontraSolutions
Introduction to .NET by QuontraSolutionsQUONTRASOLUTIONS
 
.Net Framework Introduction
.Net Framework Introduction.Net Framework Introduction
.Net Framework IntroductionAbhishek Sahu
 

Was ist angesagt? (20)

Net framework
Net frameworkNet framework
Net framework
 
Dotnet interview qa
Dotnet interview qaDotnet interview qa
Dotnet interview qa
 
.Net overview|Introduction Of .net
.Net overview|Introduction Of .net.Net overview|Introduction Of .net
.Net overview|Introduction Of .net
 
.Net framework components by naveen kumar veligeti
.Net framework components by naveen kumar veligeti.Net framework components by naveen kumar veligeti
.Net framework components by naveen kumar veligeti
 
.Net framework
.Net framework.Net framework
.Net framework
 
.Net platform an understanding
.Net platform an understanding.Net platform an understanding
.Net platform an understanding
 
Java vs .net
Java vs .netJava vs .net
Java vs .net
 
.Net framework
.Net framework.Net framework
.Net framework
 
Introduction to ,NET Framework
Introduction to ,NET FrameworkIntroduction to ,NET Framework
Introduction to ,NET Framework
 
Introduction to .net FrameWork by QuontraSolutions
Introduction to .net FrameWork by QuontraSolutionsIntroduction to .net FrameWork by QuontraSolutions
Introduction to .net FrameWork by QuontraSolutions
 
Microsoft dot net framework
Microsoft dot net frameworkMicrosoft dot net framework
Microsoft dot net framework
 
.Net slid
.Net slid.Net slid
.Net slid
 
.Net Framwork Architecture And components
.Net Framwork Architecture And components.Net Framwork Architecture And components
.Net Framwork Architecture And components
 
.Net framework
.Net framework.Net framework
.Net framework
 
.net CLR
.net CLR.net CLR
.net CLR
 
.Net framework
.Net framework.Net framework
.Net framework
 
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
 
Introduction to .NET by QuontraSolutions
Introduction to .NET by QuontraSolutionsIntroduction to .NET by QuontraSolutions
Introduction to .NET by QuontraSolutions
 
Csharp
CsharpCsharp
Csharp
 
.Net Framework Introduction
.Net Framework Introduction.Net Framework Introduction
.Net Framework Introduction
 

Andere mochten auch

.net framework from 1.0 -> 4.0
.net framework from 1.0 -> 4.0.net framework from 1.0 -> 4.0
.net framework from 1.0 -> 4.0ligaoren
 
Architecture of .net framework
Architecture of .net frameworkArchitecture of .net framework
Architecture of .net frameworkThen Murugeshwari
 
Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Jeff Blankenburg
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework OverviewDoncho Minkov
 
Building Office 365 solutions with React
Building Office 365 solutions with ReactBuilding Office 365 solutions with React
Building Office 365 solutions with ReactWaldek Mastykarz
 
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0Antonio Chagoury
 
Using MongoDB with the .Net Framework
Using MongoDB with the .Net FrameworkUsing MongoDB with the .Net Framework
Using MongoDB with the .Net FrameworkStefano Paluello
 
Find out Which Versions of the .NET Framework are Installed on a PC.
Find out Which Versions of the .NET Framework are Installed on a PC.Find out Which Versions of the .NET Framework are Installed on a PC.
Find out Which Versions of the .NET Framework are Installed on a PC.raj upadhyay
 
Using The .NET Framework
Using The .NET FrameworkUsing The .NET Framework
Using The .NET FrameworkLearnNowOnline
 
Владимир Никонов "Вызовы при разработке enterprise продукта"
Владимир Никонов "Вызовы при разработке enterprise продукта"Владимир Никонов "Вызовы при разработке enterprise продукта"
Владимир Никонов "Вызовы при разработке enterprise продукта"Fwdays
 
Dotnet Frameworks Version History
Dotnet Frameworks Version HistoryDotnet Frameworks Version History
Dotnet Frameworks Version Historyvoltaincx
 
Overview of .Net Framework 4.5
Overview of .Net Framework 4.5Overview of .Net Framework 4.5
Overview of .Net Framework 4.5Bhushan Mulmule
 
Dive into Microsoft SharePoint Server 2016 Upgrade, Migration and beyond
Dive into Microsoft SharePoint Server 2016 Upgrade, Migration and beyondDive into Microsoft SharePoint Server 2016 Upgrade, Migration and beyond
Dive into Microsoft SharePoint Server 2016 Upgrade, Migration and beyondJason Himmelstein
 
Nakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - EnglishNakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - EnglishSvetlin Nakov
 

Andere mochten auch (19)

.net framework from 1.0 -> 4.0
.net framework from 1.0 -> 4.0.net framework from 1.0 -> 4.0
.net framework from 1.0 -> 4.0
 
Architecture of .net framework
Architecture of .net frameworkArchitecture of .net framework
Architecture of .net framework
 
Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
 
Building Office 365 solutions with React
Building Office 365 solutions with ReactBuilding Office 365 solutions with React
Building Office 365 solutions with React
 
.net framework
.net framework.net framework
.net framework
 
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
 
Using MongoDB with the .Net Framework
Using MongoDB with the .Net FrameworkUsing MongoDB with the .Net Framework
Using MongoDB with the .Net Framework
 
Introduction of .net framework
Introduction of .net frameworkIntroduction of .net framework
Introduction of .net framework
 
Find out Which Versions of the .NET Framework are Installed on a PC.
Find out Which Versions of the .NET Framework are Installed on a PC.Find out Which Versions of the .NET Framework are Installed on a PC.
Find out Which Versions of the .NET Framework are Installed on a PC.
 
Using The .NET Framework
Using The .NET FrameworkUsing The .NET Framework
Using The .NET Framework
 
.Net framework
.Net framework.Net framework
.Net framework
 
Владимир Никонов "Вызовы при разработке enterprise продукта"
Владимир Никонов "Вызовы при разработке enterprise продукта"Владимир Никонов "Вызовы при разработке enterprise продукта"
Владимир Никонов "Вызовы при разработке enterprise продукта"
 
Dotnet Frameworks Version History
Dotnet Frameworks Version HistoryDotnet Frameworks Version History
Dotnet Frameworks Version History
 
Overview of .Net Framework 4.5
Overview of .Net Framework 4.5Overview of .Net Framework 4.5
Overview of .Net Framework 4.5
 
Dive into Microsoft SharePoint Server 2016 Upgrade, Migration and beyond
Dive into Microsoft SharePoint Server 2016 Upgrade, Migration and beyondDive into Microsoft SharePoint Server 2016 Upgrade, Migration and beyond
Dive into Microsoft SharePoint Server 2016 Upgrade, Migration and beyond
 
Nakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - EnglishNakov - .NET Framework Overview - English
Nakov - .NET Framework Overview - English
 

Ähnlich wie Inside .net framework

.Net framework interview questions
.Net framework interview questions.Net framework interview questions
.Net framework interview questionsMir Majid
 
Dot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part iDot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part iRakesh Joshi
 
Dot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part iDot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part iRakesh Joshi
 
ASP.NET 01 - Introduction
ASP.NET 01 - IntroductionASP.NET 01 - Introduction
ASP.NET 01 - IntroductionRandy Connolly
 
election survey comapny in delhi|election survey company|election survey comp...
election survey comapny in delhi|election survey company|election survey comp...election survey comapny in delhi|election survey company|election survey comp...
election survey comapny in delhi|election survey company|election survey comp...dnnindia
 
SynapseIndia dotnet web development architecture module
SynapseIndia dotnet web development architecture moduleSynapseIndia dotnet web development architecture module
SynapseIndia dotnet web development architecture moduleSynapseindiappsdevelopment
 
Chapter1_Part1.pptx
Chapter1_Part1.pptxChapter1_Part1.pptx
Chapter1_Part1.pptxRaajzKoirala
 
Introduction to .NET Programming
Introduction to .NET ProgrammingIntroduction to .NET Programming
Introduction to .NET ProgrammingKarthikeyan Mkr
 
Dot net interview_questions
Dot net interview_questionsDot net interview_questions
Dot net interview_questions9292929292
 
Unit I- Introduction to .NET Framework.pdf
Unit I- Introduction to .NET Framework.pdfUnit I- Introduction to .NET Framework.pdf
Unit I- Introduction to .NET Framework.pdfUjwala Junghare
 

Ähnlich wie Inside .net framework (20)

1.0
1.01.0
1.0
 
.Net framework interview questions
.Net framework interview questions.Net framework interview questions
.Net framework interview questions
 
.Net Session Overview
.Net Session Overview.Net Session Overview
.Net Session Overview
 
Dot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part iDot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part i
 
Dot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part iDot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part i
 
Tutorial c#
Tutorial c#Tutorial c#
Tutorial c#
 
ASP.NET 01 - Introduction
ASP.NET 01 - IntroductionASP.NET 01 - Introduction
ASP.NET 01 - Introduction
 
C Sharp Jn
C Sharp JnC Sharp Jn
C Sharp Jn
 
C Sharp Jn
C Sharp JnC Sharp Jn
C Sharp Jn
 
election survey comapny in delhi|election survey company|election survey comp...
election survey comapny in delhi|election survey company|election survey comp...election survey comapny in delhi|election survey company|election survey comp...
election survey comapny in delhi|election survey company|election survey comp...
 
Microsoft.Net
Microsoft.NetMicrosoft.Net
Microsoft.Net
 
SynapseIndia dotnet web development architecture module
SynapseIndia dotnet web development architecture moduleSynapseIndia dotnet web development architecture module
SynapseIndia dotnet web development architecture module
 
Chapter1_Part1.pptx
Chapter1_Part1.pptxChapter1_Part1.pptx
Chapter1_Part1.pptx
 
c#.pptx
c#.pptxc#.pptx
c#.pptx
 
Introduction to .NET Programming
Introduction to .NET ProgrammingIntroduction to .NET Programming
Introduction to .NET Programming
 
Dotnet1
Dotnet1Dotnet1
Dotnet1
 
Inside.Net
Inside.NetInside.Net
Inside.Net
 
Dot net interview_questions
Dot net interview_questionsDot net interview_questions
Dot net interview_questions
 
Unit I- Introduction to .NET Framework.pdf
Unit I- Introduction to .NET Framework.pdfUnit I- Introduction to .NET Framework.pdf
Unit I- Introduction to .NET Framework.pdf
 
Vb
VbVb
Vb
 

Mehr von Faisal Aziz

Mozilla Devroom Session
Mozilla Devroom SessionMozilla Devroom Session
Mozilla Devroom SessionFaisal Aziz
 
Learn mozilla l10n in 5 steps
Learn mozilla l10n in 5 steps Learn mozilla l10n in 5 steps
Learn mozilla l10n in 5 steps Faisal Aziz
 
Learn mozilla l10n in 5 steps
Learn mozilla l10n in 5 steps Learn mozilla l10n in 5 steps
Learn mozilla l10n in 5 steps Faisal Aziz
 
Lecture 2-project organization
Lecture 2-project organizationLecture 2-project organization
Lecture 2-project organizationFaisal Aziz
 
Modified.net overview
Modified.net overviewModified.net overview
Modified.net overviewFaisal Aziz
 
The ecommerce-models-1208250464320375-9
The ecommerce-models-1208250464320375-9The ecommerce-models-1208250464320375-9
The ecommerce-models-1208250464320375-9Faisal Aziz
 
Event+driven+programming key+features
Event+driven+programming key+featuresEvent+driven+programming key+features
Event+driven+programming key+featuresFaisal Aziz
 
The msg box function and the messagebox class
The msg box function and the messagebox classThe msg box function and the messagebox class
The msg box function and the messagebox classFaisal Aziz
 
Business intelligence
Business intelligenceBusiness intelligence
Business intelligenceFaisal Aziz
 
Rock your firefox
Rock your firefoxRock your firefox
Rock your firefoxFaisal Aziz
 
How to use firefox like a boss
How to use firefox like a bossHow to use firefox like a boss
How to use firefox like a bossFaisal Aziz
 

Mehr von Faisal Aziz (17)

Mozilla Devroom Session
Mozilla Devroom SessionMozilla Devroom Session
Mozilla Devroom Session
 
Learn mozilla l10n in 5 steps
Learn mozilla l10n in 5 steps Learn mozilla l10n in 5 steps
Learn mozilla l10n in 5 steps
 
Learn mozilla l10n in 5 steps
Learn mozilla l10n in 5 steps Learn mozilla l10n in 5 steps
Learn mozilla l10n in 5 steps
 
Spmcasestudy
SpmcasestudySpmcasestudy
Spmcasestudy
 
Lecture 2-project organization
Lecture 2-project organizationLecture 2-project organization
Lecture 2-project organization
 
Vb.net ide
Vb.net ideVb.net ide
Vb.net ide
 
Modified.net overview
Modified.net overviewModified.net overview
Modified.net overview
 
The ecommerce-models-1208250464320375-9
The ecommerce-models-1208250464320375-9The ecommerce-models-1208250464320375-9
The ecommerce-models-1208250464320375-9
 
Event+driven+programming key+features
Event+driven+programming key+featuresEvent+driven+programming key+features
Event+driven+programming key+features
 
Arrays
ArraysArrays
Arrays
 
The msg box function and the messagebox class
The msg box function and the messagebox classThe msg box function and the messagebox class
The msg box function and the messagebox class
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Hci history
Hci historyHci history
Hci history
 
Hci chapt1
Hci chapt1Hci chapt1
Hci chapt1
 
Business intelligence
Business intelligenceBusiness intelligence
Business intelligence
 
Rock your firefox
Rock your firefoxRock your firefox
Rock your firefox
 
How to use firefox like a boss
How to use firefox like a bossHow to use firefox like a boss
How to use firefox like a boss
 

Kürzlich hochgeladen

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Kürzlich hochgeladen (20)

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 

Inside .net framework

  • 1. Inside .Net Framework By Prof. Sheetal R. Uplenchwar
  • 2. CLR  The Common Language Runtime (CLR) is a special run time environment that provides the underlying infrastructure for Microsoft's .NET framework.  This runtime is where the source code of an application is compiled into an intermediate language called CIL (Common Intermediate Language), originally known as MSIL (Microsoft Intermediate Language).  When the program is then run, the CIL code is translated into the native code of the operating system using a just-in-time (JIT) compiler.  This intermediate language is used to keep the environment platform-neutral and as a result, supports all .NET languages such as C# or VB.NET
  • 3.
  • 4. Advantages  Portability  Using an intermediate language instead of compiling straight to native code requires n + m translators instead of n*m translators to implement it in n languages on m platforms.  Security  The high level intermediate code is more ready for deployment and runtime enforcement of security.  Interoperability  Every major .NET language supports CLR and all get compiled to CIL. In that intermediate language, implementation of services such as security and garbage collection are the same.
  • 5.  This allows one library or application of one .NET language to inherit implementations from classes written in another .NET language.  This cuts down on the redundant code developers would have to write to make a system work in multiple languages, allowing for multi-language system designs and implementations.  Additionally, to keep full component interoperability, the runtime incorporates all metadata into the component package itself, essentially making it self-describing.  The main advantage of the .NET Framework is the interoperability between different languages. As all the Microsoft .NET languages share the same common runtime language, they all work well together. For example, you can use an object written in C# from Visual Basic.NET. The same applies for all the other Microsoft .NET languages
  • 6.  Application related advantages Automated Garbage Collection Support for explicitly free threading, which allows for the creation of multi-threaded, scalable applications. Support for uniform exception handling Use of delegate functions instead of function pointers for increased type safety and security.
  • 7. MSIL  VB.Net compiles code which is processor independent.  It is portable to n no of platforms.  This MSIL is then given as input to JIT Compilers which converts it into native(machine )code.  At the time of generation of MSIL code all metadata(methods, properties, events, data types) gets created.
  • 8. JIT Compilers  Microsoft provides a set of JIT compilers for each supported platform.  These compilers compile MSIL code into native machine code.  Unlike traditional compilers JIT doesn’t compile the full class file in one shot.  Compilation is done on function basis or file basis.
  • 9.  The high level programming languages that need to be compiled require a runtime, so that the architecture on which the language runs is provided with details on how to execute its code.  All the programming languages use its corresponding runtime to run the application. For example, to run an application developed using Visual Basic, the computer on which the application will be run must be installed with the Visual Basic runtime.  The Visual Basic runtime can run only the applications developed with Visual Basic and not the ones developed with any other programming language like Java.
  • 10.  In the .NET Framework, all the Microsoft .NET languages use a common language runtime, which solves the problem of installing separate runtime for each of the programming languages.  Microsoft .NET Common Language Runtime installed on a computer can run any language that is Microsoft .NET compatible.
  • 11.  When you compile a Microsoft.NET language, the complier generates code written in the Microsoft Intermediate Language (MSIL). MSIL is a set of instructions that can quickly be translated into native code.  A Microsoft.NET application can be run only after the MSIL code is translated into native machine code. In .NET Framework, the intermediate language is complied "just in time" (JIT) into native code when the application or component is run instead of compiling the application at development time.
  • 12. Compilation Execution Compilation & Execution Cycle of .Net application
  • 13. Types of JIT  Pre-JIT :  Per-JIT compiler compiles source code into native code in a single compilation cycle.  Econo- JIT: Econo-  JIT compiles methods that are called at runtime. However, these compiled methods are discarded when they’re not required.  JIT (Normal JIT) –  They’re called “JIT” or “Normal JIT”. Normal JIT only compiles the methods which are called at runtime.  These methods are compiled the first time they’re called and then they’re stored in cache. When the same methods are called again, the compilation code from cache is used for execution.
  • 14. Managed Code  Managed Code is what Visual Basic .NET and C# compilers create.  It compiles to Intermediate Language (IL), not to machine code that could run directly on your computer.  The IL is kept in a file called an assembly, along with metadata that describes the classes, methods, and attributes (such as security requirements) of the code  This assembly is the one-stop-shopping unit of deployment in the .NET world.  You copy it to another server to deploy the assembly there—and often that copying is the only step required in the deployment.
  • 15.  Managed code runs in the Common Language Runtime. The runtime offers a wide variety of services to your running code.  In the usual course of events, it first loads and verifies the assembly to make sure the IL is okay.  Then, just in time, as methods are called, the runtime arranges for them to be compiled to machine code suitable for the machine the assembly is running on, and caches this machine code to be used the next time the method is called. (This is called Just In Time, or JIT compiling, or often just Jitting.)  As the assembly runs, the runtime continues to provide services such as security, memory management, threading, and the like. The application is managed by the runtime
  • 16. Unmanaged code  It is what you use to make before Visual Studio .NET 2002 was released.  Visual Basic 6, Visual C++ 6, heck, even that 15- year old C compiler produced unmanaged code.  It compiled directly to machine code that ran on the machine where you compiled it—and on other machines as long as they had the same chip, or nearly the same.  It didn't get services such as security or memory management from an invisible runtime; it got them from the operating system, usually by calling an API provided in the Windows SDK.
  • 17. System Types  System class library  .Net Framework Class Library It is a library of classes, interfaces and value types . It optimizes the development process, provides access to system functionality . It is designed to be as a foundation on which .Net framework applications, components and controls are built.
  • 18.  FCL is an integral component of the .NET framework.  It consists of object oriented collection of reusable classes that can be used to develop command line, GUI, web applications etc.  It is designed into a hierarchical tree structure & divided into namespace.  Before .Net class framework, each programming required its own class libraries.  All .Net languages share the .Net class framework requiring no special language specific libraries.  Syntax used to perform the task between .Net languages looks the same as the same namespace & parameters is to be used.
  • 19.  The .Net framework class library is divided into 2 parts  Base class library  Framework class library.  Base class library  It includes a small subset of the entire class library & is the core set of classes that serve as the basic API of the common language runtime.  The classes in mscorlib.dll , system.dll & system.core.dll are consiered as part of BCL.  Framework class library  It is a superset of the BCL classes & refers to the entire class library that ships with .Net framework.  It includes winforms, ADO.Net, ASP.Net etc.
  • 20. Namespaces in vb.net  System: Includes essential classes and base classes for commonly used data types, events, exceptions and so on System.Collections: Includes classes and interfaces that define various collection of objects such as list, queues, hash tables, arrays, etc System.Data: Includes classes which lets us handle data from data sources System.Data.OleDb: Includes classes that support the OLEDB .NET provider System.Data.SqlClient: Includes classes that support the SQL Server .NET provider System.Diagnostics: Includes classes that allow to debug our application and to step through our code System.Drawing: Provides access to drawing methods
  • 21.  System.Globalization: Includes classes that specify culture-related information System.IO: Includes classes for data access with Files System.Net: Provides interface to protocols used on the internet System.Reflection: Includes classes and interfaces that return information about types, methods and fields System.Security: Includes classes to support the structure of common language runtime security system System.Threading: Includes classes and interfaces to support multithreaded applications System.Web: Includes classes and interfaces that support browser- server communication System.Web.Services: Includes classes that let us build and use Web Services System.Windows.Forms: Includes classes for creating Windows based forms System.XML: Includes classes for XML support
  • 22. System.object class  It is the base class of all classes in the .Net framework.  It is the root of the type hierarchy. Name Description Determines whether the specified Equals(Object) Object is equal to the current Object. Determines whether the specified Equals(Object, Object) object instances are considered equal. Allows an object to try to free resources and perform other cleanup Finalize operations before it is reclaimed by garbage collection.
  • 23. Serves as a hash function for a GetHashCode particular type. GetType Gets the Type of the current instance. Creates a shallow copy of the current MemberwiseClone Object. Determines whether the specified ReferenceEquals Object instances are the same instance. Returns a string that represents the ToString current object.
  • 24. Common type system  With common type system all data types are provided as objects in the System.object class.  This class is accessible by all .Net programming languages & enforced by CLR.  Also previously type conversions needed to be performed every time when data was exchanged.  With the CTS, it is no longer necessary to cast data types between assemblies that are written in different languages.  CTS provides a new standard for .Net assemblies called as type safe compatibility.  To achieve type safe compatibility, some languages have to adjust their data type.  Language interoperability is achieved with the help of CTS.  Same data type is available in all .Net compatible languages.
  • 25. Classification of CTS Types  Value types  It directly contain the data that you assign them.  Value types are fixed in size.  Actual values of data are stored in stack.  If you assign a value of a variable to another it will create two copies.  All primitive data type except string and object are example of value types. struct and enum are value type.  Reference type  Reference types are not fixed in size.  It directly do not contain any data.  It point to a memory location that contains the actual data.  They are maintained in system managed heap but it also uses stack to store reference of heap.
  • 26.  Two primitive types (string and object) and non-primitive data types (class, interface & delegate) are examples of reference type.
  • 27. Basic Value types VB Keyword Bytes .NET type Description Byte 1 Byte 0-255 SByte 1 SByte -128 to 127 Short 2 Int16 -32,768 to +32,767 UShort 2 UInt16 0 to 65535 Integer 4 Int32 -2,147,483,648 to + 2,147,483,647 UInteger 5 UInt32 0 to 4,294,967,295 Long 8 Int64 -9,223,372,036, 854,775,808 to +9,223,372,036 ,854,775,807
  • 28. ULong 8 UInt64 0 to +18,446,744, 073,709,551, 615 Single 4 Single A non integer number with approximately 7 significant digits Double 8 Double A non integer number with approximately 14 significant digits
  • 29. Decimal 16 Decimal A non integer number with approximately 28 significant digits (integer and fraction) that can represent values up to 79,228 X 1024 Char 2 Char A single Unicode character Boolean 1 Boolean A True or False value