Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardC#boxing and unboxing costSingle-choice MCQ

Two boxed integers holding the same value are compared with the `==` operator (operands typed as `object`). What happens at runtime and why?

object a = 5; object b = 5; Console.WriteLine(a == b);