Microsoft.NET 2.0 Interview Questions And Answers
Download Microsoft.NET 2.0 Interview Questions and Answers PDF
Strengthen your Microsoft.NET 2.0 interview skills with our collection of 19 important questions. Our questions cover a wide range of topics in Microsoft.NET 2.0 to ensure you're well-prepared. Whether you're new to the field or have years of experience, these questions are designed to help you succeed. Get the free PDF download to access all 19 questions and excel in your Microsoft.NET 2.0 interview. This comprehensive guide is essential for effective study and confidence building.
19 Microsoft.NET 2.0 Questions and Answers:
Microsoft.NET 2.0 Job Interview Questions Table of Contents:
1 :: In .NET Compact Framework, can we free memory explicitly without waiting for garbage collector to free the memory?
NET Compact Framework come with CLR which perform automatic garbage collector to free the memory without using destector(perform garbage collector when is declear)
Read More2 :: What are the main components in .Net?
In-Process Components
In .NET, components built as DLLs run within the process space of the host application and share memory and processor time with their host applications. At run time, the component (which is part of the host application's assembly and is referenced by its manifest) is loaded from disk and added to the host application's process space. Because no remote procedure calls are generated to mediate communication between the component and its host, setting and reading property values, invoking methods, and responding to events raised by the component occurs very quickly.
Out-of-Process Components
An alternate architecture involves server applications that run as independent processes outside of the client application process space. These server applications usually (but not always) have an EXE file name extension. When Windows loads an out-of-process component, a separate process space is created for the component, and Windows manages the out-of-process component's resource requirements independently of the client application. Windows mediates the dialog between the server application (that is, the component) and the client (the consumer) by passing messages between them.
Read MoreIn .NET, components built as DLLs run within the process space of the host application and share memory and processor time with their host applications. At run time, the component (which is part of the host application's assembly and is referenced by its manifest) is loaded from disk and added to the host application's process space. Because no remote procedure calls are generated to mediate communication between the component and its host, setting and reading property values, invoking methods, and responding to events raised by the component occurs very quickly.
Out-of-Process Components
An alternate architecture involves server applications that run as independent processes outside of the client application process space. These server applications usually (but not always) have an EXE file name extension. When Windows loads an out-of-process component, a separate process space is created for the component, and Windows manages the out-of-process component's resource requirements independently of the client application. Windows mediates the dialog between the server application (that is, the component) and the client (the consumer) by passing messages between them.
3 :: Explain the procedure to add assemly to GAC to make it shared one?
Strong name the assembly using snk and copy the assembly into the windows/assembly folder
Private assemblies are very useful, but sometimes we will want to put a DLL in a central place so that a single copy can be shared by the other assemblies on the system. .NET has such a repository, called the Global Assembly Cache(GAC). An assembly placed into the GAC is called a Shared Assembly.
Read MorePrivate assemblies are very useful, but sometimes we will want to put a DLL in a central place so that a single copy can be shared by the other assemblies on the system. .NET has such a repository, called the Global Assembly Cache(GAC). An assembly placed into the GAC is called a Shared Assembly.
4 :: How to prepare parametrized (with more than one parameters) crystal report.pls tell me the code procedure, if any body can?
It works for me with this code:ParameterFields paramFields = new ParameterFields(); //setdata ParameterField param_date = new ParameterField(); param_date.ParameterFieldName = "date"; ParameterDiscreteValue d = new ParameterDiscreteValue(); d.Value = this.date+" - "+this.datesf; param_date.CurrentValues.Add(d); paramFields.Add(param_date); //set number ParameterField param_no = new ParameterField(); param_no.ParameterFieldName = "number"; ParameterDiscreteValue number = new ParameterDiscreteValue(); if (this.no==0) number .Value = ""; else number.Value = this.no.ToString(); param_no.CurrentValues.Add(number); paramFields.Add(param_no); //and so on repview_total.ParameterFieldInfo = paramFields;
Read More5 :: Consider a datagrid in windows application. Here item, rate, qty, amount field are there. When user enters rate and qty, amount should be automatically calculated. When enter key is pressed, the cursor should go from item to rate and then qty and then amount. But amount should be automatically calculated. In Grid when button is clicked, then and then only new row should be created and another button is clicked, row should be removed.Thus give me the solution?
A custumised datagridview class has to be written this .class has to inherit the datagridview class.ProcessDialogKey & ProcessDataGridViewKey functions of datagridview class has to be overidden to change the behaviour of tab and enter key.this class is avaible at msdn web site.To make changes to amount column automatically CellValueChanged of datagridview can be called.To make insert and delete operations button type columns can be added and grid.rows.add , grid.rows.remove methods can be called o insert and delete row.
Read More6 :: How to create multiple inheritance inc#, with example?
A class can implement multiple interfaces.
public class A : Ix, Iy,Iz
This way you can achieve multiple inheritence
In C#, a class cannot have multiple inheritance with classes. But class can have multiple inheritance with one class and more than one interface.
Eg:
namespace TestClass
{
public class A
{
public void testA()
{
Console.WriteLine("In Class A");
}
}
interface IB
{
void testIB();
}
interface IC
{
void testIC();
}
public class Test : A, IB, IC
{
public void testIB()
{
Console.WriteLine("In Interface IB");
}
public void testIC()
{
Console.WriteLine("In Interface IC");
}
}
class Program
{
static void Main(string[] args)
{
Test tt = new Test();
tt.testA();
tt.testIB();
tt.testIC();
Console.ReadLine();
}
}
}
Read Morepublic class A : Ix, Iy,Iz
This way you can achieve multiple inheritence
In C#, a class cannot have multiple inheritance with classes. But class can have multiple inheritance with one class and more than one interface.
Eg:
namespace TestClass
{
public class A
{
public void testA()
{
Console.WriteLine("In Class A");
}
}
interface IB
{
void testIB();
}
interface IC
{
void testIC();
}
public class Test : A, IB, IC
{
public void testIB()
{
Console.WriteLine("In Interface IB");
}
public void testIC()
{
Console.WriteLine("In Interface IC");
}
}
class Program
{
static void Main(string[] args)
{
Test tt = new Test();
tt.testA();
tt.testIB();
tt.testIC();
Console.ReadLine();
}
}
}
8 :: What is IL in VB.Net?
The code which we write in .net are basically source code.When we compile it the .net CLR 1st convert it from source code to machine understandable language. and that language is called as IL or MSIL
Read More9 :: Explain What is the difference between response.redirect & server.transfer?
The difference between Server.Transfer and Response.Redirect are as follow
1>Response.redirect sends message to the browser saying it to move to some different page while Server.transfer does not send any message to the browser but rather redirects the uyser directly from the server itself.So in Server.transfer their is no round trip while Response.redirect has a round trip hence puts a load on the server.
2>Using Sever.transfer you cannot redirect to a different server itself while using Response.redirect you can redirect to a different server also.
3>With Server.transfer you can preserve your information.It has a parameter called as "preserve form",so the existing query string etc will be avilable in the calling page.This is not possible in Response.redirect.
Read More1>Response.redirect sends message to the browser saying it to move to some different page while Server.transfer does not send any message to the browser but rather redirects the uyser directly from the server itself.So in Server.transfer their is no round trip while Response.redirect has a round trip hence puts a load on the server.
2>Using Sever.transfer you cannot redirect to a different server itself while using Response.redirect you can redirect to a different server also.
3>With Server.transfer you can preserve your information.It has a parameter called as "preserve form",so the existing query string etc will be avilable in the calling page.This is not possible in Response.redirect.
10 :: What is interface and abstract class in .Net?
when a class is not provided with full functionalitythen it is declared as abstract.it doesn't support instance creation as well as it cannot be overridable to child class.interface is a colection of methods only without functionality.interface is 90% same as abstract class.
An interface class is a class contains all functions that are are abstract.
An abstract class is a class that may or may not contain an abstract function.
Abstract function : functions with only declaration , no definition is present. the user implimenting, inheriting the function has to override the function , mandatorily.
Instances of abstract class and interface class are made at runtime.so objects cannot be created ,due to lack of informations of the class.
Read MoreAn interface class is a class contains all functions that are are abstract.
An abstract class is a class that may or may not contain an abstract function.
Abstract function : functions with only declaration , no definition is present. the user implimenting, inheriting the function has to override the function , mandatorily.
Instances of abstract class and interface class are made at runtime.so objects cannot be created ,due to lack of informations of the class.
11 :: Explain How to rename a table using sql queries?
exec sp_rename 'oldTableName' , 'newTableName'
Use server side for secure validation. Use client side for fast,user friendly validations.
Execute sp_rename 'oldtablename', 'newtableaname'
sp_rename OldTableName, NewTableName
Read MoreUse server side for secure validation. Use client side for fast,user friendly validations.
Execute sp_rename 'oldtablename', 'newtableaname'
sp_rename OldTableName, NewTableName
12 :: A developer company sends dlls to the client. some client is not happy current functionality, so request some modification. developer made some changes and send new dll to all clients. Some client is happy with old version, tell me minimal change to so that neither clients get affected?
In vb.net we have a version control in there we have 1.1.2.3 this is the old version of Dll we have change only the 1.1.2.4 for the New dll which is compablitly of the ealry version.
One need to specify "bindingRedirect" in the config file.
e.g.
<configuration>
<runtime>
<assemblyBinding smlns="urn:schema-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Test" publickeyToken="b035c4774706cc72" culture="neutral">
<bindingRedirect oldVersion="1.1.2.4">
newVersion="1.1.2.3"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Read MoreOne need to specify "bindingRedirect" in the config file.
e.g.
<configuration>
<runtime>
<assemblyBinding smlns="urn:schema-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Test" publickeyToken="b035c4774706cc72" culture="neutral">
<bindingRedirect oldVersion="1.1.2.4">
newVersion="1.1.2.3"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
13 :: What is marshling?
Marshaling performs the necessary conversions in data formats between managed and unmanaged code.CLR allows managed code to interoperate with unmanaged code usining COM Marshaler(Component of CLR)
Read More14 :: What is the difference between asp.net & vb.net and explain architecture?
ASP.NET is a web-development platform.VB.NET is a language.Web-development with ASP.NET platform HTML,CSS, Client side scripts, ASP.NET tags and code behind with VB.NET or C#.NET or J#/C++ combination.
Read More15 :: How to use datagrid value in select statements where condition ,if cell is hyperlink bounded column?
We can check it item_databound event of the datagrid.
Read More16 :: Explain What rare the Types of JIT and what is econo-JIT?
Types of jit : prejit,ecno jit,normal jit
pre jit : convert source code to native code in single completion of cycle.Normally this can be done at the time of deployment.
econo jit : coverts the only called methods to native code,however it can be removed when are not required.
normal jit : compliled the called methods to native code.In the the methods can be compiles for the first time.For latter calls it can be displayed using cached items.
Read Morepre jit : convert source code to native code in single completion of cycle.Normally this can be done at the time of deployment.
econo jit : coverts the only called methods to native code,however it can be removed when are not required.
normal jit : compliled the called methods to native code.In the the methods can be compiles for the first time.For latter calls it can be displayed using cached items.
17 :: Explain What is the reason of occurring overflow-underflow arithmetic exception error, it shows error message when we run our program by adding control?
Its due to Divide by Zero Error i.e 5/0
Read More18 :: What are the new features 3.5 framework against with the tool?
1) In Built AJAX
2) Compiler Version is changed.
3) LINQ
Read More2) Compiler Version is changed.
3) LINQ
19 :: What is 2 tier and 3 tier architecture?
2 Tier Architecture:
This appliation having only Presentation Layer and Database Layer.
3 Tier Architecture:
This application having Presentation Layer(User Interface) ,Business Layer for only calling Database Layer,Database Access Layer(DAL for maintaining Data Access Method).
Read MoreThis appliation having only Presentation Layer and Database Layer.
3 Tier Architecture:
This application having Presentation Layer(User Interface) ,Business Layer for only calling Database Layer,Database Access Layer(DAL for maintaining Data Access Method).