Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Diff b/w casting and boxing

Answers were Sorted based on User's Feedback



Diff b/w casting and boxing..

Answer / ritesh kumar

Boxing is converting a value type to a reference type
(Object Type).Casting is converting a reference type to a
reference type or a value type as another value type.
int i = 0;
object o = (object)i; //this is boxing
int i2 = (int)o; //this is unboxing.

long l = (long)i; //this is casting.

Is This Answer Correct ?    29 Yes 1 No

Diff b/w casting and boxing..

Answer / kamlesh sharma

casting is a process to convert data of one type to another
data type
and boxing is the process to convert value type to
reference type

Is This Answer Correct ?    13 Yes 0 No

Diff b/w casting and boxing..

Answer / hafiz usman majeed

casting is the process of coverting one type of data to
another type of data. it is superclass for all type of type
conversions.whereas boxing is subclass of casting where
value types are converted to reference types

Is This Answer Correct ?    12 Yes 5 No

Diff b/w casting and boxing..

Answer / senthil kumar

casting is convertion of data like integer to string,string
to interger,etc..,

but the boxing simply involves to convert the value types
to reference types.That means assigning the value to the
object.

Is This Answer Correct ?    8 Yes 7 No

Post New Answer

More C Sharp Interview Questions

Is c# good for beginners?

0 Answers  


Why main method is static in c#?

0 Answers  


What is marshalling and what are different kinds of marshalling?

0 Answers  


What Is The Difference Between ViewState and SessionState?

1 Answers   Fiserv,


Which is faster array or arraylist in c#?

0 Answers  


What is difference between dictionary and hashtable?

0 Answers  


Why are local variables stored in stack?

0 Answers  


What is verbatim string?

0 Answers  


What is a clr (common language runtime)?

0 Answers  


how do you do exception management

4 Answers   Accenture, HCL,


How is a strongly-named assembly different from one that isn’t strongly-named?

0 Answers  


What is polymorphism? pl explain practically rather than theoretical?

3 Answers  


Categories