Professional Documents
Culture Documents
NET is a software framework/infrastructure developed by Microsoft used to develop, run, and deploy the applications like
console applications, web services and web applications.
In a layered representation, the .NET Framework is a layer positioned between the Microsoft Windows operating system and
your applications.
.NET is a platform but also is defined as a Technology because it is composed of several parts such as libraries, executable
tools, and relationships and integrates with the operating system.
Microsoft Visual Studio 2015 relies on the new version of the .NET Framework 4.5.2. Visual Basic 2015, C# 4.5, and F# 2015 are .NET
languages that rely on and can build applications for the .NET Framework 4.5. The new version of this technology introduces important
various new features that impose lots of enhancements and came up with the new era of programming tools and environment.
It’s no secret among developers that there is no better development environment than Microsoft Visual Studio. It offers the most
complete set of tools to create powerful windows, web or any other application and can be done in almost any common language.
Visual Studio is available in a version that fits every developer’s needs.
When you install Microsoft Visual Studio, the setup process installs the .NET Framework. .NET is installed to a folder named
%windir%\Microsoft.NET\Framework\....
If you open this folder with Windows Explorer, you see a lot of subfolders, libraries, and executable tools. Most of the DLL
libraries constitute the Base Class Library, whereas most of the executable tools are invoked by Visual Studio to perform
different kinds of tasks, even if they can also be invoked from the command line.
Now you need to notice the presence of a file named Vbc.exe, which is the Visual Basic Compiler and a command line
tool.
In most cases you do not need to manually invoke the Visual Basic compiler, because you will build your Visual Basic
applications writing code inside Visual Studio, and the IDE invokes the compiler for you.
This means that the Visual Basic compiler is also provided free with .NET, and this is the philosophy that characterizes the
.NET development since the first version was released in 2002.
1.2 What Is Visual Basic .NET?
Visual Basic .NET (VB.NET) is an object-oriented computer programming language implemented on the .NET Framework. Although it
is an evolution of classic Visual Basic language, it is not backwards-compatible with VB6, and any code written in the old version does
not compile under VB.NET.
Like all other .NET languages, VB.NET has complete support for object-oriented concepts. Everything in VB.NET is an object, including
all of the primitive types (Short, Integer, Long, String, Boolean, etc.) and user-defined types, events, and even assemblies. All objects
inherit from the base class Object.
VB.NET is implemented by Microsoft's .NET framework. Therefore, it has full access to all the libraries in the .Net Framework. It's
also possible to run VB.NET programs on Mono, the open-source alternative to .NET, not only under Windows, but even Linux or
Mac OSX.
1.2.2 VB or VB.Net?
VB.NET is part of a brand new platform, based on the .NET Framework. All languages in .NET are based on this new platform, which
allows many great new capabilities for a VB developer. Because the .NET Framework is fully object-oriented, .NET languages also
must support OO features.
VB.NET is fully object-oriented where as Visual Basic was object based(does not support polymorphism and inheritance).
It also introduces another level of complexity along with this new power.
VB. NET came up with advanced error handling and debuggers.
Various application settings stored in XML config files which also makes things a bit simpler to produce and deploy..
An incredible IDE.
Fully support to service oriented architecture.
Cross-language inheritance
Provide solution for situations like DLL Hell. "DLL Hell" refers to the set of problems caused when multiple applications
attempt to share a common component like a dynamic link library (DLL) or a Component Object Model (COM) class. This
problem was solved by using the concept named as ‘Versioning’.
1) Operating System
Note: The code that is run under CLR is called Managed code.
Common Language Runtime is the heart of the .NET framework.
CLR provides a number of services that includes:
The resource, which is within 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.
2) Un-Managed Code
The code, which is developed outside .NET, Framework is known as unmanaged code.
Applications that do not run under the control of the CLR are said to be unmanaged, and certain languages such
as C++ can be used to write such applications, which, for example, access low - level functions of the operating
system. Background compatibility with code of VB, ASP and COM are examples of unmanaged code.
Unmanaged code is executed with help of wrapper classes which are of two types: CCW (COM callable wrapper)
and RCW (Runtime Callable Wrapper).
3) Native Code
The code to be executed must be converted into a language that the target operating system understands,
known as native code.
This conversion is called compiling code, an act that is performed by a compiler.
Under the .NET Framework, however, this is a two - stage process. With help of MSIL and JIT.
It is language independent code. When you compile code that uses the .NET Framework library, you don't immediately
create operating system - specific native code.
Instead, you compile your code into Microsoft Intermediate Language (MSIL) code. The MSIL code is not specific to any
operating system or to any language.
MSIL stands for Microsoft Intermediate Language. We can call it as Intermediate Language (IL) or Common
Intermediate Language (CIL).
During the compile time, the compiler converts the source code into Microsoft Intermediate Language (MSIL).
MSIL is a CPU-independent set of instructions that can be efficiently converted to the native code.
During the runtime the (CLR)'s Just In Time (JIT) compiler converts the MSIL code into native code to the
Operating System.
When a compiler produces MSIL, it also produces Metadata. The MSIL and Metadata are contained in a portable
executable (PE) file.
The Portable Executable (PE) format is a file format for executables, object code, and DLLs, used in 32-bit and 64-bit
versions of Windows operating systems.
The PE file format was defined to provide the best way for the Windows Operating System to execute code and also
to store the essential data which is needed to run a program.
JIT (Just-in-Time) Compiler: 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.