This is lesson 8 of 11 in this module Course 29% complete

Boxing And Unboxing

Premium Content

Sign in with your account or join us to access this lesson.

The lesson explains how all .NET types sharing a common Object base class forces boxing (copying a value type from stack to heap) and unboxing to reverse it, introducing avoidable memory copy overhead, and shows how generics and method overloads eliminate the need for object-typed variables.