Microsoft .Net Interview Questions and Answers
What is the base class of .NET?
Base class provides a base set of methods that all
derived classes can use
Assemblies are similar to dll files. Both has the
reusable pieces of code in the form of classes/
functions. Dll needs to be registered but assemblies
have its own metadata.
Assembly is a single deployable unit that contains
information about the implementation of classes,
structures and interfaces. it also stores the
information about itself called metadata and includes
name and verison of the assembly, security information,
information about the dependencies and the list of files
that constitute the assembly.
Assembly also contains namespaces. In the .Net
Framework, applications are deployed in the form of
An assembly is a single deployable unit that contains
all the information about the implementation of :
- structures and
An assembly stores all the information about itself.
This information is called METADATA and include the name
and the verison number of the assembly, security
information, information about the dependencies and a
lost of files that constitute the assembly.
All the application developed using the .NET framework
are made up of assemblies.
Namespaces are also stored in assemblies
In the Microsoft .NET framework an assembly is a
partially compiled code library for use in deployment,
versioning and security. In the Microsoft Windows
implementation of .NET, an assembly is a PE (portable
executable) file. There are two types, process
assemblies (EXE) and library assemblies (DLL). A process
assembly represents a process which will use classes
defined in library assemblies. In version 1.1 of the CLR
classes can only be exported from library assemblies; in
version 2.0 this restriction is relaxed. The compiler
will have a switch to determine if the assembly is a
process or library and will set a flag in the PE file.
.NET does not use the extension to determine if the file
is a process or library. This means that a library may
have either .dll or .exe as its extension.
The code in an assembly is partially compiled into CIL,
which is then fully compiled into machine language at
runtime by the CLR.
An assembly can consist of one or more files. Code files
are called modules. An assembly can contain more than
one code module and since it is possible to use
different languages to create code modules this means
that it is technically possible to use several different
languages to create an assembly. In practice this rarely
happens, principally because Visual Studio only allows
developers to create assemblies that consist of a single
Name some of the languages .NET support?
Some of the languages that are supported by .NET
1. Visual Basic.NET
2. Visual C#
3. Visual C++
ADO.NET features? Benefits? Drawbacks?
1. Data will be retrieved through Datasets
1. Disconnected Data Architecture
2. Data cached in Datasets
3. Data transfer in XML format
4. Interaction with the database is done through data
How many types of exception handlers are there in .NET?
MSDN>gt; “How the Runtime Manages Exceptions”
The exception information table represents four types of
exception handlers for protected blocks:
A finally handler that executes whenever the block
exits, whether that occurs by normal control flow or by
an unhandled exception.
A fault handler that must execute if an exception
occurs, but does not execute on completion of normal
A type-filtered handler that handles any exception of a
specified class or any of its derived classes.
A user-filtered handler that runs user-specified code to
determine whether the exception should be handled by the
associated handler or should be passed to the next
1. Unstructured Exception Handling
2. Structured Exception Handling
Difference between Panel and GroupBox classes?
Panel and Group box both can used as container for other
controls like radio buttons and check box.
the difference in panel and group box are Panel
1) In case of panel captions cannot be displayed
2) Can have scroll bars.
1) Captions can be displayed.
2) Cannot have a scroll bar
Panel is scrollable. In panel you can’t set caption like
What is the base class of Button control?
Listing from visual studio .net > Button Class
What is Response object? How is it related to ASP’s
Response object allows the server to communicate with
the client(browser). It is useful for displaying
information to the user (or) redirecting the client.
Eg: Response.Write(”Hello World”)
hat is IIS? Have you used it?
IIS - Internet Information Server
IIS is used to access the ASP.Net web applications
Yes, I used in ASP.NET web applications.
Main differences between ASP and ASP.NET.
1. ASP: Code is Interpreted
ASP.NET: Code is Compiled
2. ASP: Business Logic and Presentation Logic are in a
ASP.NET: Business Logic and Presentation Logic are in
separate files (.cs or .vb) and (.aspx) respectively.
3. ASP: No Web Server Controls
ASP.NET: Web Server Controls supported by strong .NET
4. ASP: No RAD in Classic ASP
ASP.NET: Supports RAD
1.Asp is interpreted
Asp.net is compiled which is faster than asp.
2 Asp.net maintains its own CLR and is managed as it
runs by CLR
Where as asp is unmanaged
3 We can mainatin sessions in state server and sql
server which is Outproc,
where in asp sessions will be last if we restart
webserver or make changes.
4 In asp.net we can configure each application using
web.config file which is availble in application itself
and we have machine.config wherer we can configure all
In asp we cannot configure single aplication
5 Asp.net we have autopostback event which is not in asp
6 In asp.net we have global.asax where can hadle some
global things which is not in asp.
7 We have well built GUI to work in asp.net
8 We have ado.net and as well as disconnected
architecture in asp.net
9 We have Xcopy deployment in asp.net
10. We can work with any language as code behind
technique in asp.net that supports .net frame work
a) asp.net is compiled but ASP is a interpretor or
b) asp.net is supported more control then the asp.
c) asp.net is more supported even control then the asp.
d) In asp.net if update any component then no need to
shutdown the computer but in asp if loaded any component
then need tobe shutdown the computer.
d) So lastly an asp.net is faster then asp .
Page Numbers : 1