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
I need Online Slot Video Game For A Facebook Project Description: Prepare an online slot video game for a Face book promotion in order to attract new visits and Increase the

I need C# API for bitfinex Project Description: Hi, I need a developer to build a library in C# that connects to the bitfinex API. The library must implement all the authenti

What does Xml Validating Reader class do? The XmlTextReader class does not validate the contents of an XML source against a schema. The correctness of the XML documents can be

Web-App Developer for Startup Project Description: I am seeking someone who is good at building dynamic sites that will run on both desktops and tablets. The core of the w

What is strong-typing versus weak-typing? Which is preferred? Why? Strong type is checking the types of variables as soon as possible, usually at compile time. While weak typing

Is spending in projects constant throughout the project? Generally in initial stage of projects (design and requirement phase) the cost is very less (as you require maximum bus

What is code access security (CAS)? Code access security (CAS) is part of the .NET security model that stops unauthorized access of resources and operations, and restricts the

Which are the namespaces in localization and globalization? There are 2 most important namespaces:- 1)System.Globalization - It contains classes that define culture-relate

What is DISCO? DISCO is a method developed by Microsoft to publish and discover Web services. It discovers URLs of all XML Web services located on a Web server and develops a

What are wait handles? The Wait handles sends signals of a thread status from one thread to another thread. There are 3 kind of wait modes:- A)WaitOne. B)WaitAny. C)Wa