MSDN docs say that only value types need boxing, but this does not apply to string, which is a value type and does not need to be boxed. I initially tried Type.IsValueType, but since that returns true for string, I can't use it to determine whether a type really needs to be boxed. Are there any other methods you are aware of? Is string the only exception?
UPDATE: I made a mistake in my code where I referenced an int and I thought it was a string. String is in fact a value type, thanks for pointing it out guys!