c# 一个有类参数的类会和类参数同增同减是为什么

为什么不带注释的那组代码controller1.boy.Age和yboy.Age绑定在了一起,只要一个增加或减少另外一个也会增加或减少
但是带注释的那组代码就不会发生改变

class Program
{
    static void Main(string[] args)
    {
        Boy yboy = new Boy() { Age = 20 };
        Controller controller1 = new Controller(yboy);
        yboy.Age  = 100;
        Console.WriteLine();
        Console.WriteLine();
        Console.WriteLine();
        controller1.boy.Age = 200;
        Boy xboy = new Boy() { Age = 10 };
        Controller controller2 = new Controller(xboy);
        Console.WriteLine(controller1.boy.Age);
        Console.WriteLine("-----------------------");
        Console.WriteLine(controller2.boy.Age);
        Console.WriteLine("---------------------------------");
        Console.WriteLine(xboy.Age);
        Console.WriteLine(yboy.Age);
        Console.ReadKey();

        //Girl xgirl = new Girl() { Age = 10 };
        //Calculator calculator = new Calculator(xgirl);
        //xgirl.Age += 100;
        //Console.WriteLine(xgirl.Age);
        //Console.WriteLine(calculator.xxx);
        //Console.ReadKey();


    }
}
class Controller
{
    public Boy boy;
    public Controller(Boy _boy)
    {
        if (_boy.Age <= 15)
        {
            this.boy = _boy;
            this.boy.Age += 1;


        }
        else
        {
            this.boy = _boy;
        }
    }


}
class Boy
{
    public int Age { get; set; }
}




//class Calculator
//{
//    public int xxx { get; set; }
//    public Calculator(Girl girl)
//    {
//        if (girl != null)
//        {
//            this.xxx = girl.Age;
//            this.xxx -= 1;
//        }
//    }
//}
//class Girl
//{
//    public int Age { get; set; }
//}

}

Controller类中对boy对象,是引用类型,修改其中一个,引用到的对象都会变化
Calculator中int类型不是对象,为值引用,修改后不会相互影响。
具体题主可以参考此文:

因为Boy作为这个类的属性,通过构造方法,给body赋值。

class Controller
{
    public Boy boy;
    public Controller(Boy _boy)
    {
        if (_boy.Age <= 15)
        {
            this.boy = _boy;
            this.boy.Age += 1;
 
 
        }
        else
        {
            this.boy = _boy;
        }
    }
}