Demonstrating boxing and unboxing - c# program, DOT NET Programming

Assignment Help:

Demonstrating Boxing and Unboxing - C# Program

Hi,

Can any of you, tell me how to use boxing and Unboxing in c#?


Related Discussions:- Demonstrating boxing and unboxing - c# program

What is sql cache dependency?, The SQL cache dependencies is a new characte...

The SQL cache dependencies is a new characteristic in ASP.NET 2.0 which can automatically invalidate a cached data object (like a Dataset) when the related data is modified in the

What is plinq, What is PLINQ? PLINQ stands for Parallel Language Integr...

What is PLINQ? PLINQ stands for Parallel Language Integrated Query. It is the parallel execution of LINQ, in which a query can be implemented by using multiple processors. PLIN

Professional telerik winform, Professional TELERIK Bind MS ACCESS Req...

Professional TELERIK Bind MS ACCESS Required: 1. Including custom fields to the Schedule. 2. Schedule Calendar Sync with Outlook 3. Selecting display in Schedule res

File upload in asp.net, upload files using file upload control to google dr...

upload files using file upload control to google drive

How to identify that the page is postback?, How can we identify that the Pa...

How can we identify that the Page is PostBack? The Page object has the "IsPostBack" property which can be checked to know that the page is posted back.

I have a website with a photo gallery, I have a website with a photo galler...

I have a website with a photo gallery using PhotoHandler -photohandler.codeplex.com I require the code added/ modified to display the image file names under the preview or thumbnai

Railway reservation system, i want to know the code for adding new item but...

i want to know the code for adding new item button in .net forms and delete button in vb.net forms. can any one pls help

Explain different types of xml application programming, Explain different t...

Explain different types of XML Application Programming Interface (API). The following are two main parts of XML parsers: Tree-based API - Compiles an XML document into a tre

Capstone .., Why isn''t there an allowed amount for nonfacility for code 27...

Why isn''t there an allowed amount for nonfacility for code 27405?

I need very easy project in metatrader, I need very easy project in metatra...

I need very easy project in metatrader Project Description: I have 3 indicators.... ADX, emas crossover and macd crossover! They are all signals, arrows! But i would like to

Max

2/11/2013 5:48:02 AM

You might check out this, this is useful for you

Demonstrating Boxing and Unboxing - C# Program

using System; 

class Boxing 

      public static void main(string[] a) 

       { 

            //  BOXING 

               int m = 10; 

               object om = m; // creates a box to hold m 

               m = 20; 

              Console.WriteLine("****** BOXING *****"); 

              Console.WriteLine("m = " + m); // m = 20 

              Console.WriteLine("om = " +om);// om = 10 

              Console.ReadLine(); 

            //  UNBOXING 

               int n = 10; 

               object on = n; // box n (creates a box to hold n) 

               int x = (int)on; // unbox on back to an int 

              Console.WriteLine("**** UNBOXING *****"); 

              Console.WriteLine("n = " + n); // n = 20 

              Console.WriteLine("on = " +on);// on = 10 

              Console.ReadLine(); 

          } 

}

Bella

2/11/2013 5:50:52 AM

Hey Max you are a GREAT instructor! As a C# beginner, this is the first time out of at least three previous tried?that I can finally understand what is boxing and unboxing in c#.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd