Reference object is not changing it value in function (C#)

I got class Item and class Shield : Item.

And a function Equip(Item EquipingItem, Item Slot), which shouldequip an item to a slot;

But it don’t do it. In debugger the variable Slot is fine, I can look at it, and it have all parameters, same as EquipingItem. In the code, after I call Equip(a,b) the b is still null, and I don’t get why.

void Start ()
{
     Item LeftHandSlot = new Item();
     NewShield = new Shield();
     NewSield.Name = "Some Shield";
     NewSield.Armor = 10;

     Equip(NewShield,LeftHandSlot);
     //LeftHandSlot is null, why?
}
    
public class Item
{
	//Some variables
}

public class Shield : Item
{
	//Some variables
}

private void Equip(Item EquipingItem, Item Slot)
{
	Slot = EquipingItem;
}

Try using the ref keyword. Try setting Equip function as :

private void Equip(Item EquipingItem, ref Item Slot)
 {
     Slot = EquipingItem;
 }

and call it like this :

Equip(a, ref b)

This will do the job for you.