Skip to content
Quiz · Value and reference types · lesson 6 of 11

Quiz — a parameter and boxing

Question 1 of 2

What does the program print?

C#
Box box = new Box();
Change(box);
Console.WriteLine(box.Value);

void Change(Box b)
{
    b.Value = 2;
    b = new Box();
    b.Value = 3;
}

class Box { public int Value; }