- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference between Boxing and Unboxing in C#
Boxing convert value type to an object type whereas unboxing converts object type to the value type.
Let us see the difference between Boxing and Unboxing in C#.
In boxing, the value stored on the stack is copied to the object stored on heap memory, whereas unboxing is the opposite.
In Unboxing, the object's value stored on the heap memory is copied to the value type stored on stack.
Unboxing has explicit conversion whereas boxing has implicit conversion.
int a = 10; object obj = a; // boxing int b = (int) ob; // unboxing
- Difference between Boxing and Unboxing in C# programming.
- Boxing and Unboxing in C#
- What is boxing and unboxing in Java?
- Java Boxing and Widening
- Autoboxing and Unboxing in Java
- What is boxing in C#?
- What is unboxing in C#?
- Difference between !== and ==! operator in PHP
- Difference between . and : in Lua programming
- Difference between C# and .Net
- Difference between Process and Thread
- Difference between Concurrency and Parallelism
- Difference between localhost and 127.0.0.1?
- Difference between JCoClient and JCoDestination