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

I need web based inventory management system, I need Web Based Inventory Ma...

I need Web Based Inventory Management System Project Description: I require a build in software which has the subsequent features, if anybody has ready to use web based appli

Can event''s have access modifiers?, The Events are always public as they a...

The Events are always public as they are meant to serve each one registering to it. But you can access modifiers in the events.You may have events with protected keyword which will

For loop, create a table using class file

create a table using class file

Web application for australian football league, 1  Assignment Description  ...

1  Assignment Description   This is an individual assignment. Students are referred to the Faculty's policy on plagiarism.  In this assignment you will build a prototype of a si

Various ways of authentication techniques in asp.net, What are the various ...

What are the various ways of authentication techniques in ASP.NET? The Selection of  an authentication provider is as simple as making an entry in  the web.config file of  the

What are the four workflow principles, What are the four workflow principle...

What are the four workflow principles? According to Microsoft, there are four main principles that define the behavior and working of workflows. Developers can use these princi

I need responsive database structure and web template, I have a responsive ...

I have a responsive database structure and web template. I need someone to prepare the code (.net, jquery ) to make interaction with database . Insert, edit , save . Plus a custom

Satellite assemblies, What are satellite assemblies? We use resource fi...

What are satellite assemblies? We use resource files to store data according to the localized languages. But when you actually go for the deployment you will not like to also i

Precautions to take while deploying satellite assemblies, What precautions ...

What precautions we need to take while deploying satellite assemblies? When we distribute the assembly, the folder structure has to be very organized. The table below shows how

Determining salvage value of an item - c# program, Determining salvage valu...

Determining salvage value of an item - C# Program I am a learner of C# language and i am struggling with the programming functions in c#. Can you have any code examples for th

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