- Microsoft .NET is a vision and set of Microsoft software technologies for connecting information,systems, people, and devices. Integrated across the Microsoft platform, .NET technology provides the ability to quickly build, deploy, manage,& use connected, security-enhanced solutions with Web services.
What is the Microsoft.NET
Framework?
| ||||||||||||||||
Dot Net consist
of number of technologies that allow s/w developer to build Networked Applications as well as
Distributed Web Services and Web Applications.
The main two components
of .Net Framework are Common Language
Runtime (CLR) and .Net Framework
Class Library (FCL).
CLR is the runtime
environment of the .Net Framework that executes and manages all running code
like a Virtual Machine.
FCL is a huge collection of
language-independent and type-safe reusable classes.FCL are arranged into a
logical grouping according to their functionality and usability is called
Namespaces.
|
What is new feature of 2.0?
|
New feature of
2.0 frameworks:-
Ø
Master Page.
Ø
Profiles
Ø
Grid view Control.
Ø
Doses not supports LINQ Data source.
Ø
Doses not support for
Multi-targeting Support.
Ø
Does not support JavaScript Debugging and
Intelligence.
Ø
Dose not supports AJAX; AJAX is integrated in .NET framework.
Ø
Dose not supports silver light.
|
What is new feature of 3.5?
|
New
feature of 3.5 frameworks:-
Ø
New List View and Data Pager
Controls.
Ø
Nested Master Page.
Ø
It supports LINQ Data source.
Ø
Multi-targeting Support.
Ø
It supports JavaScript Debugging and Intelligence.
Ø
It supports AJAX; AJAX is integrated in .NET framework.
Ø
It supports silver light.
Ø
ASP.NET Merge Tool
Ø
Collection Initializers
Ø
Extension Methods
Ø
Implicitly Typed Variable
Ø
Anonymous Types
Ø
Automatic Property setters/getters
Ø
Object Initializers
Ø
WCF Support for RSS, JSON, POX and Partial Trust
|
What New in Visual Basic 2010 Original
Release Version?
|
feature
of 4.0 frameworks:-
Ø Auto-Implemented Properties
Ø Collection Initializers
Ø Implicit Line Continuation
Ø Multiline Lambda Expressions and Subroutines
Ø New Command-Line Option for Specifying a Language Version
Ø Type Equivalence Support
Ø Dynamic Support
Ø Covariance and Contravariance
Ø Navigate To Highlighting References
Ø Generate From
Usage
Ø IntelliSense
Suggestion Mode
|
Q3] How to Microsoft .Net Framework
|
![]() |
What is a CLR?
|
The main function of
CLR is to convert the Managed Code
into native code and then execute the Program.
The Common Language Runtime (CLR)’s Just In Time (JIT) compilation
converts MSIL to native code on demand at application run time.
During the execution of the program, The CLR defines the CTS,
which is a standard type system used by all .Net languages.
That means all .NET
programming languages uses the same representation for common Data Type, so CLR is a
language-independent runtime environment.
The CLR environment is also referred to as a managed
environment, because during the execution of a program it also controls the
interaction with the Operating System.
Following are the responsibilities of CLR
Ø the CLR manages memory,
Ø Thread execution,
Ø Garbage Collection (GC),
Ø Exception Handling,
Ø Common Type System (CTS),
Ø code safety verifications,
Ø other system services.
|
.Net Framework Class Library (FCL)
|
The .Net Framework class library (FCL) provides the core
functionality of .NET Framework architecture .
The .Net Framework Class
Library (FCL) includes a huge collection of reusable classes, interfaces, and
value types that expedite and optimize the development process and provide
access to system functionality.
The .Net Framework class library (FCL) organized in a
hierarchical tree structure and it is divided into Namespace.
|
What is a CTS?
|
Common Type System (CTS)
Ø
Common Type System (CTS) describes a set
of types that can be used in different .Net languages in common.
Ø
CTS ensure that objects written in
different .Net languages can interact with each other.
Ø
It facilitates cross-language
integration, type safety, and high performance code execution
For example:-
“Integer” data type in VB6 & “int”
data type in C++ è will convert into System.int32, which is data type of CTS.
|
Microsoft Intermediate Language – (MSIL)
OR (IL) OR (CIL)
|
MSIL stands for Microsoft Intermediate Language. OR Intermediate Language (IL) OR Common Intermediate Language (CIL).
During the compile time, the
compiler converts the source code (your code) into MSIL.
MSIL is a CPU-independent set of instructions that can be
efficiently converted to the native code.
During the CLR's JIT compiler converts the MSIL code
into native code to the Operating System.
MSIL includes
instructions for loading, storing, initializing, and calling methods on
objects, as well as instructions for arithmetic and logical operations,exception handling, control flow, direct memory access, and other operations.
|
What is a CLS?
|
Common Language Specification (CLS)
Ø Common Language Specification (CLS) defines a
subset of CTS.
Ø Common Language Specification (CLS) defines the rules and
standards or Guidelines, that language should follow so that it can
communicate with other .NET languages.
Ø
CLS take care of all
different language in to one umbrella.
|
.Net Garbage Collection
|
“GC is a background process which check
unused object in the application & clean them up”.
Garbage
Collector .NET Framework is used for Automatic Memory Management.
Garbage collector runs, When
application is running low of memory.
we can call Garbage Collector (GC) explicitly in the program by
calling System.GC.Collect namespace.
|
Which Interface used in GC
|
What is an Assembly?Why Use
Assembly? Different type of Assembly?
|
Ø An assembly is a collection of one or more Process Assemblies
(EXE) and Library Assemblies (DLL)
Ø During the compile time Metadata is created, with MSIL, and stored in a file called a
Manifest. Both Metadata and MSIL together wrapped in a Portable
Executable (PE) file.
Ø Manifest contains information about itself. This information is
called Assembly Manifest, it contains information about the members, types,
references and all the other data that the runtime needs for execution.
Ø Each Assembly can have only one entry point (that is, DllMain,
WinMain, or Main).
WHY use Assembly:-
Ø Assembly
is used to solve DLL hell problem.
e.g. (two dll exist with same name,
then pervious get overwrite (delete), Hence we cannot maintains same name of
dll.)
Following are the different type of Assembly
1.
Private Assembly
2.
Shared Assembly
3.
Satellite Assembly
A private Assembly
Ø is
used only by a single (particular) application, and usually it is stored in
that application's install directory.
Ø Private
Assembly cannot be references outside the scope of the folder where they are
kept
A shared Assembly
Ø is a public(Shared) assembly
that is shared by multiple applications.
If multiple applications need to access an Assembly, we should add the Assembly to the Global Assembly Cache (GAC).
Ø Shared Assembly is one
that can be referenced by more than one application.
A satellite assembly
Ø
Using satellite assemblies, you can place
the resources for different languages in different assemblies, and the
correct assembly is loaded into memory only if the user selects to view the
application in that language.
|
.Net
Assembly Contents
|
A .NET static assembly can consist of following elements:
1) Assembly Manifest
- The Metadata that describes the assembly and its contents
2) Type Metadata - Defines all types, their properties and methods.
3) MSIL - Microsoft
intermediate language
4) A set of Resources
- All other resources like icons,
images etc.
Only the assembly manifest is required, but either types or
resources are needed to give the assembly in any meaningful functionality.
|
What is the difference between
DLL and exe
|
|
Dynamic Lined
Library(DLL)
|
Executable file(exe)
|
A DLL is a library that does not have an entry point so it cannot be executed.
|
An EXE is a program that can be executed. It has an entry point
|
A DLL runs inside a process memory space
|
An EXE runs separately out of process in
its own memory space.
|
A DLL a new process is not created.
|
When system runs an exe, a new process is
created.
|
What is a strong name?
|
Ø Strong
name consists of an Assemblys identity that means the Assemblies can be
assigned a DIGITAL signature.
Ø Strong
Name includes the name of the .net assembly, version number, culture
identity, and a public key token.
Ø It is generated from
an assembly file using the corresponding private key.
Ø
Strong names guarantee name uniqueness by relying on unique key
pairs.
|
Global Assembly Cache (GAC)? What are the step to
create an assembly & add it to the GAC?
|
Ø The
GAC contains shared assemblies that are globally accessible to all .NET
application on the machine.
Ø The
GAC is automatically installed with the .NET runtime.
Steps to create an assembly
Create
a strong name using sn.exe tool
eg: sn -k abc.snk
in AssemblyInfo.cs, add the strong name
eg: [assembly: AssemblyKeyFile("abc.snk")]
recompile project, and then install it to GAC in two ways :
1ST WAY:- drag & drop it to assembly folder
(C:\WINDOWS\assembly
2ND WAY:- C:\WINNT\assembly) (shfusion.dll tool)
gacutil
-i abc.dll
The Global Assembly Cache
Tool (Gacutil.exe) that allows you to view and manipulate the contents of the
Global Assembly Cache.
|
What is Namespace?
|
Namespace
is simply a logical collection of related class in c#.
OR
Namespaces is a logical grouping of types for
the purpose of identification.
Example System.web.UI logical group UI
related features.
Why use/purpose: -
Ø
Prevent name conflicts.
In .Net languages every program is created with a default
Namespaces .
Programmers can also
create their own Namespaces in .Net languages.
|
What is Just In Time Compiler – JIT?
|
||
JUST
IN TIME(JIT) OR (Dynamic Translation)
JIT is a compiler that converts MSIL to native code.
In Microsoft .NET there are three types
of JIT compilers:-
1. Pre-JIT.
2. Econo-JIT.
3. Normal-JIT.
|
||
Pre-JIT
|
Econo-JIT.
|
Noraml-JIT.
|
Pre-JIT
compiles complete source code into
native code in a single compilation cycle.
This is
done at the time of deployment of the application
|
Econo-JIT compiles only those methods that are called
at runtime.
However these compiled methods are removed when they
are not required.
|
Normal-JIT compiles only these methods that are
called at runtimes.
These methods are compiled the first time they are
called, & then they are stored in cache.
When same method are called again, the compiled code
from cache is used for execution
|
Less memory required.(Mobile)
|
More memory required(PC).
|
|
Every
time compile & execution.
|
Only
one time execution
|
|
Not Effective .
|
Effective.
|
|