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                      
tip   To Refer this Site to Your Friends   Click Here
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 :: Pranab Mukherjee
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is boxing and unboxing ?
Answer
# 1
boxing is conversion from value type to object(reference) 
type.Actually the copy of value type copied from stack to 
heap memory.
unboxing is reverse of it.from heap memory back to stack 
memory.
 
Is This Answer Correct ?    5 Yes 0 No
Narayansahu
[Netx Softwares Pvt. Ltd.]
 
  Re: What is boxing and unboxing ?
Answer
# 2
Boxing and Un-boxing

Boxing allows value types to be implicitly treated like 
objects.

Dim i As Integer = 5
i.ToString()   ' i --> object --->object.tostring

OR

Dim i As Integer = 5
Dim obj As Object = i  ' implicit boxing 
obj.ToString()

OR you can do it explicitly
Dim obj As Object = CType(i, Object) ' un-necessary 
explicit boxing

On the other hand, un-boxing is an explicit conversion from 
object type to value type.

Dim i As Integer = 5
Dim obj As Object = i   ' implicit boxing 
Dim j As Integer = CType(obj, Integer)  ' explicit un-boxing



?	Boxing and Un-boxing is the transformation between 
value type and object type while casting just transforms 
the apparent (reference) type of objects. 
?	Value types are stored at the stack and objects are 
stored at the heap. 
Boxing takes a copy of value types from the stack to the 
heap while un-boxing takes value types back to the stack. 
On the other hand, casting does not physically move or 
operate on an object. Casting merely changes the way 
objects are treated in a program by altering their 
reference type.
 
Is This Answer Correct ?    2 Yes 0 No
Narayansahu
[Netx Softwares Pvt. Ltd.]
 
 
 
  Re: What is boxing and unboxing ?
Answer
# 3
BOXING
?	Boxing is an implicit conversion of a value type to 
the type object

UNBOXING
?	Unboxing is an explicit conversion from the type 
object to a value type
 
Is This Answer Correct ?    3 Yes 1 No
Satyambabu
 
  Re: What is boxing and unboxing ?
Answer
# 4
There is two type datatype available Value and reference 
type . value are stored in stack and reference type used 
in  heap . when we copy data from stack memmory to heap it 
call Boxing . 


Int32 x = 10;         object o = x ;  // Implicit 
boxing               
 Int32 y = 10;

unboxing : copy data from heap memory to stack called 
unboxing      
   object obj = (object) y; // Explicit Boxing


Rahul Tripathi 
raultripathi@myway.com
 
Is This Answer Correct ?    1 Yes 0 No
Rahultripathi
[Alphabetic Computer Services Pvt. Ltd.]
 
  Re: What is boxing and unboxing ?
Answer
# 5
Boxing;
Encapsulating a copy of value in an object.
UnBoxing:
Vice-versa
 
Is This Answer Correct ?    2 Yes 1 No
Sivasaravanan
 
  Re: What is boxing and unboxing ?
Answer
# 6
boxing is used to convert value type to reference type.
unboxing is used to convet reference type to value type.
 
Is This Answer Correct ?    4 Yes 0 No
Manish Singh(amalga Fusion)
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
Hi , I am Basha. I am searching a job in dotnet.Plz tell me the order of page events in asp.net 2.0> plz send faq's related to c#.net,asp.net,sqlserver2000 etc. to my mail-id : bashask.ss@gmail.com Sapient4
What is difference between masterpage and user control, what is the objective of master page when we had user control in .NET 1.1 version DELL2
in database table is thier . in that table fields are photoid , photoname,photo... i want display image in the gridview TCS4
Differnce between Control an View State Proteans1
Which template must you provide, in order to display data in a Repeater control?  1
What are the differences between Dataset and DataReader? Accenture3
how can u display multi language (i.e english,spanish...) web site?  2
what are the new server controls added in Asp.net 2.0? DOSPL1
Differentiate an ADO.NET Dataset and an ADO Recordset with its functionality?  3
Explain which is best suited place in the Application Start and Session_Start subroutines with an example?  3
What is pre-init event in ASP.NET 2.0 page life cycle? Fulcrum-Logic1
What is the function of the CustomValidator? a) It allows for custom C# client-side code to validate entries in a control. b) It allows for a custom mixture of validator controls to use one central control for the display of messages. c) It uses scripted client-side code to validate the entry in a control. d) It uses server-side code to validate the entry in a control. Syntax-Softtech2
How to authenticate users using Web.Config ? Accenture1
What is boxing and how it is done internally? Microsoft1
Is it possible to disable the minimized icon of a popup window using window.open. Not using iframe concept? Take-United2
How do you relate an aspx page with its code behind page ? Accenture3
how to convert varchar into datatype int............. in ASP  1
Explain the differences between Server-side and Client-side code?  2
What ASP.NET object encapsulates the state of the client and the browser? a) The Session object b) The Application object c) The Response object d) The Request object e) The Server object Syntax-Softtech3
Explain how server control validation controls works? 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