1.
|
.NET Questions and Answers
What is
difference between MetaData and Manifest?
|
|
Metadata and
Manifest forms an integral part of an assembly( dll / exe ) in .net framework
. Out of which Metadata is a mandatory component , which as the name suggests
gives the details about various components of IL code viz : Methods ,
properties , fields , class etc.
|
2.
|
What is the
top .NET class that everything is derived from?
|
|
System.Object
|
3.
|
How is method
overriding different from method overloading?
|
|
When
overriding a method, you change the behavior of the method for the derived
class. Overloading a method simply involves having another method with the
same name within the class.
|
4.
|
What is a
formatter?
|
|
A formatter is an object that is
responsible for encoding and serializing data into messages on one end, and
deserializing and decoding messages into data on the other end.
|
5.
|
What is an
ArrayList?
|
|
The ArrayList
object is a collection of items containing a single data type values.
|
6.
|
What is
static member?
|
|
The member
defined as static which can be invoked directly from the class level, rather
than from its instance.
|
7.
|
What is
Overloading?
|
|
A process of
creating different implementation of a method having a same name as base
class, in a derived class. It implements Inheritance.
|
8.
|
When do you
use virutal keyword?
|
|
When we need
to override a method of the base class in the sub class, then we give the
virtual keyword in the base class method. This makes the method in the base
class to be overridable. Methods, properties, and indexers can be virtual,
which means that their implementation can be overridden in derived classes.
|
9.
|
What is the
purpose of XML Namespaces?
|
|
An XML Namespace is a collection of
element types and attribute names. It consists of 2 parts
§ The first part is the URI used to
identify the namespace
§ The second part is the element type
or attribute name itself.
|
10.
|
What is a
constructor?
|
|
A constructor
is invoked when you use the new operator, or use the various methods of
reflection to create an instance of a class.
|
11.
|
What is the
difference between System.String and System.StringBuilder classes?
|
|
System.String
is immutable, System.StringBuilder was designed with the purpose of having a
mutable string where a variety of operations can be performed.
|
12.
|
What is the
use of JIT ?
|
|
JIT (Just -
In - Time) is a compiler which converts MSIL code to Native Code (ie.
CPU-specific code that runs on the same computer architecture).
|
13.
|
What is the
difference between early binding and late binding?
|
|
Calling a
non-virtual method, decided at a compile time is known as early binding.
Calling a virtual method (Pure Polymorphism), decided at a runtime is known
as late binding.
|
14.
|
Which method
do you invoke on the DataAdapter control to load your generated dataset with
data?
|
|
DataAdapter’s
fill () method is used to fill load the data in dataset.
|
15.
|
What is the
purpose of an Assembly?
|
|
An assembly
controls many aspects of an application. The assembly handles versioning,
type and class scope, security permissions, as well as other metadata
including references to other assemblies and resources. The rules described
in an assembly are enforced at runtime.
|
16.
|
What is
Authentication and Authorization?
|
|
Authentication is the process of identifying
users. Authentication is identifying/validating the user against the
credentials (username and password).
Authorization performs after authentication. Authorization is the process of granting access to those users based on identity. Authorization allowing access of specific resource to user. |
17.
|
What are the
types of Authentication?
|
|
There are 3 types of Authentication.
§ Windows authentication
§ Forms authentication
§ Passport authentication.
|
18
|
What is a
Literal Control?
|
|
The Literal
control is used to display text on a page. The text is programmable. This
control does not let you apply styles to its content.
|
19.
|
What are the
namespace available in .net?
|
|
Namespace is a logical grouping of
class.
§ System
§ System.Data
§ System.IO
§ System.Drawing
§ System.Windows.Forms
§ System.Threading
|
20.
|
What is
Side-by-Side Execution?
|
|
The CLR
allows any versions of the same-shared DLL (shared assembly) to execute at
the same time, on the same system, and even in the same process. This concept
is known as side-by-side execution.
|
21.
|
What are the
different types of Caching?
|
|
There are three types of Caching :
§ Output Caching
§ Fragment Caching
§ Data Caching.
|
22.
|
What is
Reference type and value type?
|
|
Reference
Type :
Reference types are allocated on the managed CLR heap, just like object
types. A data type that is stored as a reference to the value’s location.
Reference types can be self-describing types, pointer types, or interface types.
Value Type : Value types are allocated on the stack just like primitive types in VBScript, VB6 and C/C++. Value types are not instantiated using new go out of scope when the function they are defined within returns. |
23.
|
What is
Delegates?
|
|
Delegates are
a type-safe, object-oriented implementation of function pointers and are used
in many situations where a component needs to call back to the component that
is using it.
|
24.
|
What is
Authentication and Authorization?
|
|
Authentication is the process of identifying
users. Authentication is identifying/validating the user against the
credentials (username and password).
Authorization performs after authentication. Authorization is the process of granting access to those users based on identity. Authorization allowing access of specific resource to user. |
25.
|
What is a
Static class?
|
|
Static class
is a class which can be used or accessed without creating an instance of the
class.
|
26
|
What is
sealed class?
|
|
Sealed
classes are those classes which can not be inherited and thus any sealed
class member can not be derived in any other class. A sealed class cannot
also be an abstract class.
|
27.
|
What are the
two main parts of the .NET Framework?
|
|
There are the two main parts of the
.NET Framework are :
§ The common language runtime (CLR).
§ The .NET Framework class library.
|
28.
|
What is the
advantage of using System.Text.StringBuilder over System.String?
|
|
StringBuilder
is more efficient in cases where there is a large amount of string manipulation.
Strings are immutable, so each time it's being operated on, a new instance is
created.
|
29.
|
What is
reflection?
|
|
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.
|
30.
|
What is an
Application Domain? How they get created?
|
|
An
Application Domain can be thought of as a lightweight processes controlled by
the .Net runtime. Application Domains are usually created by hosts like
Windows Shell, ASP.NET and IE. When you run a .NET application from the
command-line, the host is the Shell. The Shell creates a new Application
Domain for every application.
|
No comments:
Post a Comment