ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  ASP.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
What is Boxing and Unboxing?
 Question Submitted By :: Poojitha
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is Boxing and Unboxing?
Answer
# 1
Boxing is to implicitly converting value type to refrence 
type,

int x = 10;
double y = x;


Unboxing is to explicitly converting refrence type to value 
type

double y = 10.234;
int x = (int)y;
 
Is This Answer Correct ?    4 Yes 0 No
Kautilya
 
  Re: What is Boxing and Unboxing?
Answer
# 2
The conversion of the value type to reference type is known 
as Boxing and converting reference type back to value type 
is known as Unboxing.
 
Is This Answer Correct ?    3 Yes 0 No
Lakshmi
 
 
 
  Re: What is Boxing and Unboxing?
Answer
# 3
Boxing is the process of converting value type to reference 
type.

Unboxing is the process of converting from a reference type 
to a value type.

Both are slow and should be avoided when possible or 
unneeded.

Dim st AS String
Dim obj As Object
Dim n As Integer = 5
st = n   ' Boxing happens
obj = n  ' Boxing happens

n = st   ' Unboxing happens
n = obj  ' Unboxing happens
 
Is This Answer Correct ?    0 Yes 1 No
Eduardo Belmonte
 
  Re: What is Boxing and Unboxing?
Answer
# 4
BOXING: Converting value type to referenc type.
        Here we go with an example,

ArrayList instance = new ArrayList() 
//In the above line of code,ArrayList is a reference 
type.Add some items to the arraylist. For example,

instance.Add(1);
instance.Add(100);
instance.Add(3);
//3 items added to the arraylist.
//Integer valuee 3 is value type.Adding 3 to the reference 
type(here it's arraylist) is boxing.
i.e., Converting value type to referenc type.

UNBOXING:Converting Reference type to value type.
         Below is an example, retrives the items from the 
arraylist.
         
foreach (int item in arrayList)
   Console.WriteLine(item);

Here arraylist(referenec type) will have 3 values in the 
list, which we added above. 
Adding this arraylist items to an int variable[here int 
variable is "item"] is unboxing.
i.e.,converting the reference type to value type.

Hope you would have understood.
Thanks
 
Is This Answer Correct ?    0 Yes 0 No
Kumaresh
 
  Re: What is Boxing and Unboxing?
Answer
# 5
The conversion of the value type to reference type is known 
as Boxing and converting reference type back to value type 
is known as Unboxing.
 
Is This Answer Correct ?    1 Yes 0 No
Amit
 
  Re: What is Boxing and Unboxing?
Answer
# 6
Boxing means converting value type to refrence type and un 
boxing means converting refrence type to value type
 
Is This Answer Correct ?    1 Yes 0 No
Uma
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
Explain autherization levels in .net ?  2
where can i gather the materials for MCP certification  1
how can i inharit multiple classes?  1
Which color scheme in a Repeater control can you provide alternatively?  1
what is shared assembly? Microsoft2
What tags do you need to add within the asp:datagrid tags to bind columns manually?  2
what is assembly? Microsoft2
I have one application, one user purchase some products in my application? and another person came he is also purchase some products?how can we identify which user purchase which items? my answer is by using session id? but i dont know how? can u give me programming for that?  1
What are different transaction options? Astadia1
How can we do the client side validation and Server side validations? But i told that At client side by with the help of validations control or by javascript? But I dont know about the Server side controls Explain? iSoft5
How does dataset acts in a disconnected fashion ? TCS3
what are the types of ASP objects ? Satyam4
How do you create a permanent cookie?  4
Is It Possible For Whole Page is Saved In View State? What Is View State? Phoenix-Technologies2
How do you get records number from 5 to 15 from a dataset of 100 records? Syntax-Softtech1
What?s a bubbled event? Visual-Soft5
If cookies is disabled in client browser will session work ? Satyam3
I am having four text boxes in my web application. I am setting Required Field validator to each Text box. And I am having two buttons in my application. If i clicked the first button only first two text box validation will get fire. Dont show error message for remaining two text box. If i clicked second button last two text box validation will get fired. It will not consider the first two validation controls. That is how to enable and disable the validation controls.  4
Explain the differences between Server-side and Client-side code?  3
What object is used to encapsulate a rowset? a) DataSet b) DataAdapter c) DataRowSet d) DataTable Syntax-Softtech2
 
For more ASP.NET Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com