Top "Unboxing" questions

Unboxing is the opposite of boxing.

What is boxing and unboxing and what are the trade offs?

I'm looking for a clear, concise and accurate answer. Ideally as the actual answer, although links to good explanations welcome.

language-agnostic boxing glossary unboxing
What is the difference between boxing/unboxing and type casting?

What is the difference between boxing/unboxing and type casting? Often, the terms seem to be used interchangeably.

.net casting boxing unboxing
Performance surprise with "as" and nullable types

I'm just revising chapter 4 of C# in Depth which deals with nullable types, and I'm adding a section about using …

c# performance clr nullable unboxing
Findbugs issue with "Boxing/unboxing to parse a primitive" with Integer.valueOf(String)

I have this piece of code: public void someMethod(String id) { someOtherMethod(Integer.valueOf(id)); } public void someOtherMethod(int id) { // …

java findbugs boxing unboxing
Why can't I unbox an int as a decimal?

I have an IDataRecord reader that I'm retrieving a decimal from as follows: decimal d = (decimal)reader[0]; For some reason …

c# decimal int unboxing
Boxing and unboxing with generics

The .NET 1.0 way of creating collection of integers (for example) was: ArrayList list = new ArrayList(); list.Add(i); /* boxing */ int …

c# .net generics boxing unboxing
how equal operator works with primitive and object type data

I know its a very basic question but I want to be clear about the concept. I want to know …

java equality unboxing
Unboxing a null boxed object throws unexpected NullPointerException

If you run the following code, public class Foo{ public static void main(String[] args){ int id = new Bar().getId(); // …

java eclipse nullpointerexception unboxing
Box and UnBox what does it means?

Possible Duplicates: Why do we need boxing and unboxing in C#? What is boxing and unboxing and what are the …

c# .net boxing unboxing
Android Studio: Unboxing of 'xxx' may produce 'java.lang.NullPointerException'

I'm following the Android book example: //Get the drink from the intent int drinkIdd = (Integer)getIntent().getExtras().get(EXTRA_DRINKID); …

java android-studio unboxing