Inspectopedia
 
2024.3

Boxing of already boxed value

Warning
New
Last modified: 03 December 2024

Reports boxing of already boxed values.

This is a redundant operation since any boxed value will first be auto-unboxed before boxing the value again. If done inside an inner loop, such code may cause performance problems.

Example:

After the quick fix is applied: