Dot Net Interview Questions in Dot Net Framework it consists of set of interview questions which grabs the All levels from Initial Level to High Level definitely it covers the potential stuff to all my viewers.
Dot Net Interview Questions in Dot Net Framework all provides the list of all entitled elements which provides an integrity solutions to the all my aspirants.
"I Wish You All The Best...!To Crack Your Desired Position..."
1.What is
.Net?
A).Net is a
framework tool is used to build dynamic distributed computing type of
applications.It is introduced by microsoft so we can termed it as MS.Net.
(or)
.NET is an
integral part of many applications running on Windows and provides common
functionality for those applications to run.
2.What is
Network?
A)A Network is
a group of computer systems together.Networks can be divided into many types
according to their connecting environment.
3.List the
different types of networks?
A)Generally
networks can be classified into four Types they are.
1.
Local
Area Network(LAN)
2.
Metropolitian
Area Network(MAN)
3.
Wide
Area Network(WAN)
4.
Enterprise
Area Network(EAN)
4.What is
LAN?
A)A Network
limited to small geographical location at a single place is known as LAN.Lan
Can be Divided into two types they are.
1.
Campus
Area Network(CAN)
2.
Home
Area Network(HAN)
E.G:Network Present in
School,College,Office etc…
5.What is
MAN?
A)A Network
limited to single city and its sub-urban places is known as MAN.
E.G:Citi Cable Network.
6.What is
WAN?
A)Network
which has no limit in the universe is known as WAN.
7.What is
EAN?
A)There are
2 categories available in this Intranet,Extranet
Intranet:Network limited to group of single
organizations located at places in internet.
E.g:Banking Network
Extranet:Network limited to group of
organizations located at various place is known as extranet.
EG:ATM Network
8.What are
Different types of network computing?
A)We have
different types of network computing.They are:
1.
Centralized
Computing
2.
Client-Server
Computing.
3.
Distributed
Computing.
9.What is
Centralized Computing?
A)All
computers in the network are connected to server are client.These cleints are
known as dumb terminal because it doesnot have processor,RAM,Harddisk,Operating
System.
10.What is
Client Server Computing?
A)All
computers are connected centrally locating server similar to centralized
computing but client are known as smart
or intelligent terminals because every client contains all the resources
like processor,Ram,Harddisk,Operating System etc…
11.What is Distributed
Computing?
A)In
Distributed Computing logic code of an application that is to be executed is
divided among many mechanisms in the network,to complete the execution at
faster rate and to provide the flexibility.After completion of execution result
will be integrated.
12.Is Ms.Net
is a Programming language?
A)No.It is
not a programming Language.It is a framework tool.
13.How many
Languages Ms.Net Supports?
A)Ms.Net
supports 63 Programming Languages up to 2010.Out of which 9 languages are
microsoft supportable programming languages.
14.List .Net
Supportable Programming languages?
A)Ms.Net
Supports Nine Programming
languages.They are:
1.
Visual
C#.Net
2.
Visual
Vb.Net
3.
Visual
C++.Net
4.
Visual
J#.Net
5.
Visual
F#.Net
6.
Visual Jscript.Net
7.
Iron
Phython
8.
Iron
Robous
9.
Windows
Powersheel
15.What is
an appilication ?
A)Set of
programs is used to fulfill the needs of an end user is known as
appilication.Appilication can be broadly divided into ThreeTypes.
16.What are
the different types of appilications?
A)Appilications
can be categorized into Three
types.They are
1.
Window
Based Appilications
2.
Web
Based Appilications
3.
Mobile
Based Applications
17)When Ms.Net Announced?
A) Bill
Gates delivered a keynote at Forum 2000, held June 22, 2000, outlining the .NET
'vision'. The July 2000 PDC had a number of sessions on .NET technology, and
delegates were given CDs containing a pre-release version of the .NET
framework/SDK and Visual Studio.NET.
18)What are
the Versions of MS.Net?
A) The
following table correlates .NET Framework, CLR, and Visual Studio versions and
provides a brief review of each version. Note that Visual Studio provides
multi-targeting, so you are not limited to the version of the .NET Framework
that is listed.
.Net Framework
Version
|
IDE
|
Description
|
4.5.1 Preview
|
Visual Studio 2013
Preview
|
Includes performance
and debugging improvements, support for automatic binding redirection, and
expanded support for Windows Store apps.
|
4.5
|
Visual Studio 2012
|
Included an updated
version of CLR 4, support for building Windows Store apps, and updates to
WPF, WCF, WF, and ASP.NET.
|
4.0
|
Visual Studio 2010
|
Introduced a new
version of the CLR, expanded base class libraries, and new features such as
the Managed Extensibility Framework (MEF), dynamic language runtime (DLR),
and code contracts.
|
3.5
|
Visual Studio 2008
|
Added
new features such as AJAX-enabled websites and LINQ. The SP1 update added
Dynamic Data, and a small set of additional enhancements.
|
3.0
|
Visual Studio 2005
|
This version is
essentially .NET Framework 2.0 with the addition of Windows Presentation
Foundation (WPF), Windows Communications Foundation (WCF), Windows Workflow
Foundation (WF), and CardSpace. It was updated with SP1 and SP2.
|
2.0
|
Visual Studio 2005
|
Introduced a new
version of the CLR with additions to the base class libraries, including
generics, generic collections, and significant additions to ASP.NET. This
version was updated with SP1 and SP2.
|
1.1
|
Visual Studio .NET
2003
|
Included updates to
ASP.NET and ADO.NET. This version was subsequently updated twice, with
Service Pack 1 (SP1) and SP2. This version also introduced side-by-side
execution, which enables apps on a single computer to run against multiple
versions of the CLR.
|
1.0
|
Visual Studio .NET
|
Contained the first
version of the CLR and the first version of the base class libraries.
|
19)In which
operating system Ms.Net supports?
A) Some
versions of the .NET Framework are installed automatically with the Windows
operating system, but other versions must be installed separately. The
following table identifies the installed and supported versions of the .NET
Framework for client operating systems.
Client Operating
System
|
Includes
|
Install
|
Windows 8.1 Preview
|
.Net Framework 4.5.1
Preview
|
.Net Framework 3.5
SP1
|
Windows 8
|
.NET
Framework 4.5
|
.Net Framework 4.5.1
SP1 Preview, .Net Framework 3.5 SP1
|
Windows 7 SP1
|
.NET Framework 3.5
SP1
|
.NET Framework 4.5.1
Preview, .NET Framework 4.5, .NET Framework 4
|
Windows Vista SP2
|
.NET Framework 3.0
SP2
|
.NET Framework 4.5.1
Preview, .NET Framework 4.5, .NET Framework 4, .NET Framework 3.5 SP1
|
Windows XP
Professional and Windows XP Home Edition
|
-------
|
.NET Framework 4,
.NET Framework 3.5 SP1, .NET Framework 2.0 SP2
|
20)What is
Visual Studio.Net?
A) Visual
Studio .NET is a complete set of development tools for building ASP Web
applications, XML Web services, desktop applications, and mobile applications.
Visual Basic .NET, Visual C++ .NET, Visual C# .NET, and Visual J# .NET all use
the same integrated development environment (IDE), which allows them to share
tools and facilitates in the creation of mixed-language solutions.
21)What is
.Net Framework ?
A) .NET
Framework provides a comprehensive and consistent programming model for
building applications that have visually stunning user experiences and seamless
and secure communication.
22)Explain
the features of .Net Framework?
A) The .NET
Framework is a technology that supports building and running the next
generation of applications and XML Web services. The .NET Framework is designed
to fulfill the following objectives:
Ø
To
provide a consistent object-oriented programming environment whether object
code is stored and executed locally, executed locally but Internet-distributed,
or executed remotely.
Ø
To
provide a code-execution environment that minimizes software deployment and
versioning conflicts.
Ø
To
provide a code-execution environment that promotes safe execution of code,
including code created by an unknown or semi-trusted third party.
Ø
To
provide a code-execution environment that eliminates the performance problems
of scripted or interpreted environments.
Ø
To
make the developer experience consistent across widely varying types of
applications, such as Windows-based applications and Web-based applications.
Ø
To
build all communication on industry standards to ensure that code based on the
.NET Framework can integrate with any other code.
23) What is
.Net Frame work Class Library?
A. The .NET
Framework class library is a library of classes, interfaces, and value types
that provide access to system functionality. It is the foundation on which .NET
Framework applications, components, and controls are built.
24) What are
the Components in .Net Framework?
A) Ms.Net
Framework contains the following components. They are:
1.
CLR(Common
Language Runtime)
i.
CLS(Common
Language Specification)
ii.
CTS(Common
Type System)
iii.
GC(Garbage
Collector)
iv.
JIT(Just
In time)Compiler
2. BCL (Base Class Library) Or FCL(Frame
Work Class library)
25) What is
CLR?
A) Acronym
For CLR is Common Language Run Time. The .NET Framework provides a run-time
environment called the common language runtime, which runs the code and
provides services that make the development process easier.
Compilers
and tools expose the common language runtime's functionality and enable you to
write code that benefits from this managed execution environment. Code that you
develop with a language compiler that targets the runtime is called managed
code; it benefits from features such as cross-language integration,
cross-language exception handling, enhanced security, versioning and deployment
support, a simplified model for component interaction, and debugging and
profiling services.
26)What is
CLS?
A)Acronym
for CLS is Common Language Specification.Every programming language will have
some syntactical rules used to write the code which is known as language
specification.In managed code execution process .net supports many programming languages.This
language specification of clr is common to all programming language of managed
code execution of .net and is known as CLS(Common Language Specification).
27)What is
Managed Code?
A) Managed
code is code written in one of over twenty high-level programming languages
that are available for use with the Microsoft .NET Framework, including C#, J#,
Microsoft Visual Basic .NET, Microsoft JScript .NET, and C++. All of these
languages share a unified set of class libraries and can be encoded into an
Intermediate Language (IL). A runtime-aware compiler compiles the IL into
native executable code within a managed execution environment that ensures type
safety, array bound and index checking, exception handling, and garbage
collection.
28)What is
Unmanaged Code?
A)Code that
has written before development of .Net for which MSIL is not available is not
executed by the CLR directly,rather CLR
redirects the code to OS for execution which is known as unmanaged code.Code
execution process is known as unmanaged code execution.
29)what is
Language Interoperability?
A)Providing
code execution support that has been written in other programming language is
known as language interoperability.
30)What is
CTS?
A)Acronym
for CTS is Common Type System defines how types
are system defines how types are declared, used, and managed in the
common language runtime, and is also an important part of the runtime's support
for cross-language integration.
31) List the
functions of CTS?
A) CTS offers the following functions:
Ø
Establishes
a framework that helps enable cross-language integration, type safety, and
high-performance code execution.
Ø
Provides
an object-oriented model that supports the complete implementation of many
programming languages.
Ø
Defines
rules that languages must follow, which helps ensure that objects written in
different languages can interact with each other.
Ø
Provides
a library that contains the primitive data types (such as Boolean, Byte, Char,
Int32, and UInt64) used in application development.
32) How many
types in .Net Framework?
A).Net Framework
consists of two types. They are
Ø
Value
Types
Ø
Reference
Types
33)Define
Value types?
A) Value
types are data types whose objects are represented by the object's actual
value. If an instance of a value type is assigned to a variable, that variable
is given a fresh copy of the value.
(or)
The types
which directly stores the data into their memory locations is known as value
types.
E.G:int a=12
34)Define
Reference types?
A) Reference
types are data types whose objects are represented by a reference (similar to a
pointer) to the object's actual value. If a reference type is assigned to a
variable, that variable references (points to) the original value. No copy is
made.
(or)
The types
which donot store the data directly into their memory locations rather refers
to other memory locations is known as reference types.
E.G: object o=10
35) List
different categories of types that supports by MS.Net Framework?
A).Net supports
five categories of types. They are:
Ø
Classes
Ø
Structures
Ø
Enumerations
Ø
Interfaces
Ø
Delegates
36)What is
the difference between value types and reference types?
A)
Sno
|
Value Types
|
Reference Types
|
1
|
Stores the value
directly into their memory locations
|
It Stores the other
Memory location where value is stored
|
2
|
Memory is alloted at
Compile Time
|
Memory is allotted at
Run Time
|
3
|
Memory allocation is
made with in the stack i.e in
contiguous memory locations
|
Memory allocation is
made with in the heap i.e. in Random Memory Locations.
|
4
|
CLR does not provide
Automatic Memory Management
|
CLR provides
Automatic Memory Management
|
37) What is
Automatic Memory Management?
A) Automatic
memory management is one of the services that the common language runtime
provides during Managed Execution. The common language runtime's garbage
collector manages the allocation and release of memory for an application.
38)What is Garbage Collector?
A) .NET
garbage collector provides a high-speed allocation service with good use of
memory and no long-term fragmentation problems.
39) What is
the nature of Garbage Collector?
A) Garbage
collector will divide complete managed heap into three generations internally
named as
Ø
Generation
0
Ø
Generation
1
Ø
Generation
2
40) Define
Generation?
A)A
generation is a portion of memory from the managed heap. Maximum number of
generations allowed is only three. In general always generation 2 memory size
is bigger than the generation 1 memory size and generation 1 memory size is
bigger than the generation 0 memory size. This can be represented as Gen0<Gen1<Gen2
41) What is
JIT Compiler?
A) Acronym
for JIT is Just In Time Compiler. JIT compilation converts MSIL to native code
on demand at application run time, when the contents of an assembly are loaded
and executed. Because the common language runtime supplies a JIT compiler for
each supported CPU architecture, developers can build a set of MSIL assemblies
that can be JIT-compiled and run on different computers with different machine
architectures.
42)What are
the different types of JIT Compiler?
A).Net
Supports three types of JIT Compilers are there.They are:
1.
Normal
Jitter
2.
Echono
Jitter
3.
Pre
Jitter
43)What is
Normal Jitter?
A)
Normal-JIT compiles only those methods that are called at runtime.These methods
are compiled the first time they are called, and then they are stored in cache.
When the same methods are called again, the compiled code from cache is used
for execution.
44)What is
Echono Jitter?
A) Econo-JIT
compiles only those methods that are called at runtime.However, these compiled
methods are removed when they are not required.
45)What is
Pre Jitter?
A) 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.
46)What is
Base Class Library?
A)Base Class
Libraries are building blocks of applications or programs of .net. Base Class
Libraries are designed by Microsoft.Without these cannot write any code with in
the .net.
47)Where
Base Class Libraries are located in pc’s?
A)Physical
Location of Base Class Libraries is
Ø
Root
drive:\OS Folder\assembly Folder i.e
Ø
CKwindows\assembly
48)What is
DLL?
A)Acronym
for DLL is Dynamic Link Library. A DLL is a library that contains code and data
that can be used by more than one program at the same time. For example, in
Windows operating systems, the Comdlg32 DLL performs common dialog box related
functions. Therefore, each program can use the functionality that is contained
in this DLL to implement an Open dialog box. This helps promote code reuse and
efficient memory usage.
(Or)
A Dll is a
dynamic library cannot run itself,used as a supportive file to other
applications.The Library functions are linked to the application at runtime
(Dynamically) so the name is Dll.
49)What are
the advantages of DLL?
A)DLL has
the following advantages.They are:
Ø
Uses
Fewer Resources
Ø
Promotes
modular architecture
Ø
Eases
deployment and installation
50)What is
Uses Fewer Resources?
A) When
multiple programs use the same library of functions, a DLL can reduce the
duplication of code that is loaded on the disk and in physical memory. This can
greatly influence the performance of not just the program that is running in
the foreground, but also other programs that are running on the Windows
operating system.
51)What is
Promotes modular architecture?
A) A DLL
helps promote developing modular programs. This helps you develop large
programs that require multiple language versions or a program that requires
modular architecture. An example of a modular program is an accounting program
that has many modules that can be dynamically loaded at run time.
52)What is
Eases deployment and installation?
A) When a
function within a DLL needs an update or a fix, the deployment and installation
of the DLL does not require the program to be relinked with the DLL.
Additionally, if multiple programs use the same DLL, the multiple programs will
all benefit from the update or the fix. This issue may more frequently occur
when you use a third-party DLL that is regularly updated or fixed.
53)What is
DLL Dependencies?
A) When a
program or a DLL uses a DLL function in another DLL, a dependency is created.
Therefore, the program is no longer self-contained, and the program may
experience problems if the dependency is broken.
54)What are the types of DLLs?
54)What are the types of DLLs?
A) When you
load a DLL in an application, two methods of linking let you call the exported
DLL functions. The two methods of linking are listed below.They are
Ø
Load-time
dynamic linking and
Ø
Run-time
dynamic linking.
55)What is
Exe?
A)Exe is
executable file and is not a supportive file rather itself an application.An
Exe will cannot an entry point (main function) so runs individually.
56)What is
the differences between Dll and Exe?
Sno
|
DLL
|
Exe
|
1
|
Can not run
Individually
|
Runs Individually
|
2
|
It used as supportive
file for other applications
|
Itself an application
|
3
|
It Does not contain
an Entry Point
|
Contains an Entry
Point(Main Function).So Can run individually
|
4
|
A Program/Application
with out main creates a DLL after compilation
|
A Program/Application
with Main creates an Exe after compilation
|
5
|
OS does not create a
separate process for any DLL rather DLL will run in the same process created
for an exe
|
OS Creates a separate
process for each exe it executes.
|
57)What is
Assembly?
A) An
assembly is a logical unit of functionality that runs under the control of the
.NET common language runtime (CLR). An assembly physically exists as a .dll
file or as an .exe file. However, internally an assembly is very different from
a Microsoft Win32 DLL.
58)What are
the entities in Assembly?
A) An
assembly file contains an assembly manifest, type metadata, Microsoft
intermediate language (MSIL) code, and other resources. The assembly manifest
contains the assembly metadata that provides all the information that is
required for an assembly to be self-describing. The following information is
included in the assembly manifest:
Ø
Assembly
name
Ø
Version
information
Ø
Culture
information
Ø
Strong
name information
Ø
The
assembly list of files
Ø
Type
reference information
Ø
Referenced
and dependent assembly information
The MSIL
code that is contained in the assembly cannot be directly executed. Instead,
MSIL code execution is managed through the CLR. By default, when you create an
assembly, the assembly is private to the application. To create a shared
assembly requires that you assign a strong name to the assembly and then
publish the assembly in the global assembly cache.
59)What is
Self-describing?
A) When you
create an assembly, all the information that is required for the CLR to run the
assembly is contained in the assembly manifest. The assembly manifest contains
a list of the dependent assemblies. Therefore, the CLR can maintain a
consistent set of assemblies that are used in the application. In Win32 DLLs,
you cannot maintain consistency between a set of DLLs that are used in an application
when you use shared DLLs.
60)What is
Versioning?
A) In an
assembly manifest, version information is recorded and enforced by the CLR.
Additionally, version policies let you enforce version-specific usage. In Win32
DLLs, versioning cannot be enforced by the operating system. Instead, you must
make sure that DLLs are backward compatible.
61)What is
Side-by-side deployment?
A)
Assemblies support side-by-side deployment. One application can use one version
of an assembly, and another application can use a different version of an
assembly. Starting in Windows 2000, side-by-side deployment is supported by
locating DLLs in the application folder. Additionally, Windows File Protection
prevents system DLLs from being overwritten or replaced by an unauthorized
agent.
62)What is
self-containment and isolation?
A) An
application that is developed by using an assembly can be self-contained and
isolated from other applications that are running on the computer. This feature
helps you create zero-impact installations.
63)What is
Execution?
A) An
assembly is run under the security permissions that are supplied in the
assembly manifest and that are controlled by the CLR.
64)What is
Language Independent?
A) An
assembly can be developed by using any one of the supported .NET languages. For
example, you can develop an assembly in Microsoft Visual C#, and then use the
assembly in a Microsoft Visual Basic .NET project.
65)What are
the benefits of Assembly?
A)
Assemblies are designed to simplify application deployment and to solve
versioning problems that can occur with component-based applications.
End users
and developers are familiar with versioning and deployment issues that arise
from today's component-based systems. Some end users have experienced the
frustration of installing a new application on their computer, only to find
that an existing application has suddenly stopped working. Many developers have
spent countless hours trying to keep all necessary registry entries consistent
in order to activate a COM class.
Many
deployment problems have been solved by the use of assemblies in the .NET
Framework. Because they are self-describing components that have no
dependencies on registry entries, assemblies enable zero-impact application
installation. They also simplify uninstalling and replicating applications.
66)What is
Namespace?
A) Namespace
has two basic functionality :-
Ø
NameSpace
Logically group types, example System.Web.UI logically groups our UI related
features.
Ø
In
Object Oriented world many times its possible that programmers will use thesame
class name.By qualifying NameSpace with classname this collision is able to be
removed.
67) What is
Difference between NameSpace and Assembly?
A)Following
are the differences between namespace and assembly :
Ø
Assembly is physical grouping of logical
units. Namespace logically groups classes.
Ø
Namespace can span multiple assembly.
68)What is
Versioning Problems?
A) There is
no way to maintain consistency between sets of components that are built
together and the set that is present at run time.
69)What is
DLL HELL?
A)
Previously (when using VB) we can have a situation that we have to put same
name dll file in a single directory , but the dlls are of different versions.
This is known as dll hell.
70)Define
Assembly Contents?
A)In
general,a static assembly can consist of
four elements:
Ø
The
assembly manifest, which contains assembly metadata.
Ø
Type
metadata.
Ø
Microsoft
intermediate language (MSIL) code that implements the types.
Ø
A
set of resources.
71)What is Assembly Manifest?
A) Every
assembly, whether static or dynamic, contains a collection of data that
describes how the elements in the assembly relate to each other. The assembly
manifest contains this assembly metadata. An assembly manifest contains all the
metadata needed to specify the assembly's version requirements and security
identity, and all metadata needed to define the scope of the assembly and
resolve references to resources and classes. The assembly manifest can be
stored in either a PE file (an .exe or .dll) with Microsoft intermediate
language (MSIL) code or in a standalone PE file that contains only assembly
manifest information.
72)What is
Meta Data?
A)Metadata
is binary information describing your program that is stored either in a CLR
poratable executable(PE) file or in memory.When a compiler produces MSIL,it
also produces metadata.
73)What
Metadata decribes?
A)Types in
code including the definition of each type the signature of each types members
the members that your code references and other data that the runtime uses at exeution
time.
74)What are
the functions of Assembly Maniest?
A)Assembly
Manifest lists the following functions.They are:
Ø
Enumerates
the files that make up the assembly.
Ø
Governs
how references to the assembly's types and resources map to the files that
contain their declarations and implementations.
Ø
Enumerates
other assemblies on which the assembly depends.
Ø
Provides
a level of indirection between consumers of the assembly and the assembly's
implementation details.
Ø
Renders
the assembly self-describing.
75)What is
GAC?
A)Acronym for
GAC is Global Assembly Cache. Each computer where the common language runtime
is installed has a machine-wide code cache called the global assembly cache.
The global assembly cache stores assemblies specifically designated to be
shared by several applications on the computer.
76)What is
Strong Name Assemblies?
A) A strong
name consists of the assembly's identity—its simple text name, version number,
and culture information (if provided)—plus a public key and a digital
signature. It is generated from an assembly file (the file that contains the
assembly manifest, which in turn contains the names and hashes of all the files
that make up the assembly), using the corresponding private key. Visual Studio
can assign strong names to an assembly. Assemblies with the same strong name
are expected to be identical.
77)What is
Assembly Versioning?
A) All
versioning of assemblies that use the common language runtime is done at the
assembly level. The specific version of an assembly and the versions of
dependent assemblies are recorded in the assembly's manifest.
78)Define
MSIL?
A)Acronym
for MSIL is Microsoft Intermediate Language.A Language used as the output of a
number of compilers and as the input to a just-in-time(JIT) compiler.The Common
Language runtime include a JIT Compiler for converting MSIL to native code.
79)List MSIL
Includes?
A)MSIL
includes the following:
Ø
Instructions
for loading,storing,initializing,and calling methods on objects.
Ø
Instructions
for arithmetic and logical operations.
Ø
Instructions
for Control flow.
Ø
Instructions
for Direct Memory Access.
Ø
Instructions
for Exception handling.
Ø
Instructions
for and other operations.
80)How to
Create an Assembly in c#?
A) The
following are the steps to create a private assembly (by default all assemblies
are private)
using Visual C# 2005 Express Edition.
Select
File->New Project
From
Templates, select Class Library
Enter name
CounterLibrary
A class
library is created using a single class Class1
Rename class
to Counter and add the following code.
namespace
CounterLibrary
{ public class Counter {
protected int v = 0;
public Counter(int v)
{
this.v = v;
}
public int Value
{
get
{
return v;
}
}
}
}
81)How many
Types of Assemblies?
A)There are
5 types of assemblies.
82)List the
types of Assemblies?
A) There are
5 types of assemblies.They are:
1.
Private
Assembly
2.
Public Assembly
3.
Static Assembly
4.
Dynamic Assembly
5.
Satellite Assembly
83)Define
Private Assembly?
A) A private
assembly is used only by a single application, and is stored in that
application's install directory (or a subdirectory therein). By contrast, a
private assembly name need only be unique withinthe application that uses it.
84)What is
Public Assembly or Shared Assembly?
A)If an
assembly is copied in to a global place and the reference of the assembly is
used from all other application then the assembly is known as public or global
assembly.
85)What is
Static Assembly?
A) Static
Assemblies can include .NET types (interfaces and classes), as well as required
resources for the assembly (bitmaps, JPEG files, resource files, and so on).
Static assemblies are stored on disk in PE files.
86)What is
Dynamic Assembly?
A)Dynamic
Assemblies are one which run directly from memory and are not saved to disk
before execution. They can be saved to disk after they have executed.
87)What is
satellite Assembly?
A)Satellite
assemblies are used to build multilingual applications.It provides the culture
information to build an application supportive for multiple languages.
88)What is
Multilingual applications?
A)Application
which has built in supportive of more than one human readable language like English,Hindi,Telugu,Japanese,Chinese
etc is known as multilingual appilications.To build multilingual appilication
we need to gather the information known as culture information
89)What is
culture information?
A)Information
that belongs to particular region or local or culture is known as culture
information.
90)List the
Contents of culture information?
A)Culture
information consists of following contents.They are:
Ø
Regional
Language.
Ø
Regional
Time.
Ø
Regional
Metric System.
Ø
Regional
Currency etc…
91)What is Strong
Name?
A) Strong
name is the unique name used to identify the assembly in GAC.A strong name
consists of the assembly's identity—its simple text name, version number, and
culture information (if provided)—plus a public key and a digital signature.
92)What is
the tool used for creating Strong Name?
A)Sn.Exe is
a tool used for creating Strong Name
93)How can
make any assembly as public?
A)Following steps emphasizes of creating an assembly as
public.
1.
Build
the Strong Name for the assembly.
2.
Signing
of the assembly.
3.
Copy
the assembly into GAC.
94)How can
make any assembly as private?
A) A global
assembly is a public assembly that is shared by multiple applications. Unlike
private assembly, a global assembly is not copied to bin directory of each
application that references it. Global assembly instead is placed in GAC
(Global Assembly Cache) and it can be referenced anywhere within the system. So
only one copy is stored, but many applications can use that single copy.Build
the Strong Name for the assembly.
In order to
convert a private assembly to global assembly, we have to take the following
steps.
1.
Create
a strong name
2.
Associate
strong name with assembly
3.
Place
assembly in GAC
95) What is
signing of assembly?
A) Following
steps gives the signing of assembly. They are
Ø
Copying
the key file path in to the assembly is known as signing of the assembly.
Ø
Signing
can be done at design time and also at run time.
Ø
If
signing is made at runtime it is known as delay signing.
96)What is
the syntax for creating Building the Strong Name?
A)Sn.exe –k
key file name.snk.
Key File will have a default extension of
.snk(means Strong Name Key)
97)How can
we Create Strong Name?
A) Any
assembly that is to be placed in GAC, must have a strong name. Strong name is a
combination of public key and private key. The relationship between public and
private keys are such, given one you cannot get the other, but any data that is
encrypted with private key can be decrypted only with the corresponding public
key.
Take the
following steps to invoke SN (Strong Name) tool to create strong name.
Go to
command prompt using Microsoft .NET Framework SDK v4.0 -> SDK Command prompt
Go to
c:\csharp\counterlibrary folder and enter the following command.
sn -k veerendra.key
The above
command writes private and public key pair into veerendra.key file.
98)How can
we copying the Assembly in to GAC?
A)It is not
possible to copy the assembly directly in to GAC.It consists of two tools.They
are
Ø
MS
Windows Installer 3.1
Ø
GAC
util.exe
99)Explain
the steps for MS Windows Installer 3.1?
A)This tool
is operating system tool and will work with GUI mode.
100)Explain
the steps for GAC util.exe?
A) This is
.Net framework tool and will work with CUI mode.
Following
syntax is used to copy assembly in to GAC.
Gacutil.exe
–I assembly name.
E.G:Gacutil.exe –I a.dll
a.dll is
copied in to GAC.
To delete
assembly from the GAC we use
Gacutil.exe
–u assembly name
E.G: Gacutil.exe –u a.dll
a.dll is
delete from GAC.
101) What
does 'managed' mean in the .NET context?
A)The term
'managed' is the cause of much confusion. It is used in various places within
.NET, meaning slightly different things.
Managed code: The .NET framework provides several
core run-time services to the programs that run within it - for example exception
handling and security. For these services to work, the code must provide a
minimum level of information to the runtime. Such code is called managed code.
Managed data: This is data that is allocated and
freed by the .NET runtime's garbage collector.
Managed classes: This is usually referred to in the
context of Managed Extensions (ME) for C++. When using ME C++, a class can be
marked with the __gc keyword. As the name suggests, this means that the memory
for instances of the class is managed by the garbage collector, but it also
means
more than
that. The class becomes a fully paid-up member of the .NET community with the
benefits and restrictions that brings. An example of a benefit is proper
interop with classes written in other languages – for example, a managed C++
class can inherit from a VB class. An example of a restriction is that a
managed class can only inherit from one base class.
102) what is
the difference between a private assembly and a shared assembly?
A)
Location and
visibility: A private assembly is normally used by a single application, and is
stored in the application's directory, or a subdirectory beneath. A shared
assembly is normally stored in the global
assembly cache, which
is a repository of assemblies maintained by the .NET runtime. Shared assemblies
are usually libraries of code which many applications will find useful, e.g.
the .NET framework classes.
Versioning: The runtime
enforces versioning constraints only on shared assemblies, not on private
assemblies.
103) how do assemblies
find each other?
A)By searching
directory paths. There are several factors which can affect the path (such as
the AppDomain host, and application configuration files), but for private
assemblies the search path is normally the application's directory and its
sub-directories. For shared assemblies, the search path is normally same as the
private assembly path plus the shared assembly cache.
104) Is it true that
objects don't always get destroyed immediately when the last reference goes
away?
A)Yes. The garbage
collector offers no guarantees about the time when an object will be destroyed
and its memory reclaimed.
105) What is
reflection?
A)All .NET
compilers produce metadata about the types defined in the modules they produce.
This metadata is packaged along with the module (modules in turn are packaged
together in assemblies), and can be accessed by a mechanism called reflection.
The System.Reflection namespace contains classes that can be used to
interrogate the types for a module/assembly.
106) What is
difference between shared and public?
A)An
assembly that can be referenced by more than one application. An assembly must
be explicitly built to be shared by giving it a cryptographically strong name.
107) What is
namespace used for loading assemblies at run time and name the methods?
A)System.Reflection
108) How do
you enforce garbage collection in .NET?
A)System.GC.Collect();
109)What is
Boxing?
A)Boxing is
the process of converting a variable
from value type reference type.
int a = 10;
object o;
o = a;
110)What is Unboxing?
A)UnBoxing is the process of converting variable from
reference type to value type.
E.G: int b;
object p=20;
b = (int)p;
111)What is PE File?
A)Acrontym for PE is Program Executable.PE File contains
the MSIL and metadata that is based on and extends the published microsoft PE
and common object file format (COFF) used historically for executable
content.PE stands for Portable Executable File.Format of PE is COFF(Common
object file format).
112)What is COFF?
A)Acronym for COFF is Common Object File Format.COFF is
proprietary of microsoft i.e only microsoft applications can understand COFF
format.
113)How can we create a PE File?
A)PE file can be create by using a tool.Tool used to
generate PE file is ILASM.exe (Intermediate Language Assembler).PE File can be
created at Compile Time/at Run Time.
114)What are the advantages of COFF?
A)COFF file format which accommodates MSIL or native
code as well as metadata,enables the operating system to recognize CL
images.The presence of metadata in the file along with the MSIL enables your
code to describe itself which means that there is no need for type libraries or
interface defination language.The runtime and extracts the metadata from the
file as needed during execution.
115)What is ILDASM?
A) The contents of an assembly may be viewed using the
ILDASM tool, that comes with
the .NET SDK or the Visual Studio.NET. The ildasm.exe
tool may also be used in the command line compiler.
116)Can Garbage Collector control the activities of a
thread?
A) Garbage collection is a heap-management strategy
where a run-time component takes responsibility for managing the lifetime of
the memory used by objects. This concept is not new to .NET - Java and many
other languages/runtimes have used garbage collection
for some time. The garbage collector runs periodically.
It runs through a list of objects that are currently being referenced by an
application. All objects that it does not find during this search are ready to
be destroyed (using the finalize method) and hence free the memory. However,
the runtime gets notified of the object that has been destroyed, only in the
next round of the garbage collector's periodic cycle.
In the class System.GC, there is a method called
collect( ). This forces the garbage collector to collect all unreferenced
objects immediately, thereby giving the developer some control over the garbage
collector.
There is a gcConcurrent setting that can be set through
the applications's .config file. This specifies whether or not the garbage collector performs its
activities on a specified thread or not.
117)What is CAS in .NET?
A) Acronym for CAS
is Code Access Security.CAS is the part of the .NET security model that
determines whether or not code is allowed to run, and what resources it can use
when it is running. For example, it is CAS that will prevent a .NET web applet
from formatting your hard disk.
118)What is a class attribute in .NET?
A) Class Attributes is a kind of property attached with
a class. It allows some data
to be attached to a class or method. This data becomes
part of the metadata for the class, and (like other class metadata) can be
accessed via reflection. An example of a metadata attribute is [serializable],
which can be attached to a class and means that instances of the class can be
serialized.
[Serializable]
Public Class SampleClass
( ... )
119)What is a Globalization in .Net?
A)Globalization refers to the process with which an
application or software is
designed and developed so as to make it run across all
platforms and all sites with minimum or no modification to the software
application. The software is very easy to customize so as to suit to the
location-specific conditions and it is also capable of providing information
based on the varied inputs and the location-specific operating system.
120)What are the process in Globalization?
A) There are two processes in Globalization and they are
Ø
customisation
or localisation
Ø
internationalizing
0 comments:
Post a Comment