This project has moved and is read-only. For the latest updates, please go here.

Chapter 13 boxing


In the last Pool Puzzle Solution of chapter 13(page 648, 3rd edition), the Lamp function in structure Table requires an object parameter, and the bonus question is finding where boxing happens. I'm confused by the hint nearby: 'Since the Lamp() method takes an object parameter, boxing automatically happens when it’s passed an int or a string.'
We know that string in C# is the alias of System.String, which is exactly a class, not a structure like int. So string is reference type, not value type. However it says 'int or string'. Does boxing happens when I give the Lamp(object) a string object?