Adding an empty raycast hit to a list

I need to have an empty raycast hit be assigned to a list so it can be used as data for a raycast but I get a NullReferenceException whenever I try it. Here’s what I did:

hits.Add(new RaycastHit());
RaycastHit hit = hits[hits.Count-1];
Physics.Raycast(turretMuzzle.position, turretMuzzle.forward, out hit, effectiveRange);

How should I do this?

A RaycastHit is a struct, so when you make the “hit” variable, it’s a copy of “hits[hits.Count-1]”, not a reference. So “hits[hits.Count-1]” remains as a new RaycastHit with no data.