What is concept of boxing and unboxing?, DOT NET Programming

Concept of Boxing and Unboxing

The Boxing permits any value type to be implicitly converted to type object or to any other interface type implemented by the value type. The Boxing is a process in which object instances are created and copy values into that instance.

Unboxing is just reverse of boxing operation in which the value is copied from the instance into the appropriate storage location.

Below is the sample code of boxing and  unboxing where integer data type is converted into the object and then vice versa.

Dim x As Integer

Dim y As Object

x = 10

 ' boxing process

y = x

 unboxing process

x = y

Posted Date: 9/21/2012 6:55:21 AM | Location : United States







Related Discussions:- What is concept of boxing and unboxing?, Assignment Help, Ask Question on What is concept of boxing and unboxing?, Get Answer, Expert's Help, What is concept of boxing and unboxing? Discussions

Write discussion on What is concept of boxing and unboxing?
Your posts are moderated
Related Questions
What is serialization, how it works in .NET? Serialization is when you persist the state of an object to a storage medium so an exact copy can be re-created at a later stage. S

I need CloudFlare API interface to C# Project Description: We require a small piece of C# .NET code, integrated in an object, that will interface with CloudFlare's API and ge

Looking to build FIFA coins selling and buying website Project Description: I would like a website made for FIFA 14 TEAM. What this website will do is having automatically bu

What are the features of ADO.Net ?  ADO.NET features: 1. Disconnected Data Architecture 2. Data cached in Datasets 3. Data transfer in XML format 4. Interaction wit

Project Description: We need to construct services in C# or VB.NET that can manipulate with a Targin TIP Protocol Server (protocol for financial information exchange), receive d

Explain the concept of Web services in brief. A Web service may be explained as an independent and self-sustained unit of a software application that is hosted on the Web and i

how to write a postfix expression calculator program using c#

What is a class? A class describes all the attributes of objects, as well as the methods that execute the behaviour of member objects. It is a comprehensive data type, which sh

What is Reference counting in COM? The Reference counting is a memory management method used to count the number of times an object has a pointer referring to it. The very firs

Explain different software development life cycles. The System Development Life Cycle (SDLC) is the overall process of developing information systems through multi stage proces