what does 0 in hits[0] means?

I needed a little bit idea about this because I could not able to find a good answer. I want to know what does the 0 in the List of hits mean, like if it is the first hit point or something else and what happens if I wrote different number instead of 0.

public GameObject Radicle;
ARRaycastManager aRRaycastManager;

void Start()
    aRRaycastManager = GetComponent<ARRaycastManager>();

void Update()
    List<ARRaycastHit> hits = new List<ARRaycastHit>();
    if(hits. Count > 0 )
            Radical.transform.position = hits[0].pose.position;
            Radical.transform.rotation = hits[0].pose.rotation;

Well, the code consist more details but I think this will be enough to get my question, but if required I can provide more.

In C# and most other languages, we count indexes from zero. So the first item in the list is item zero, the second item is item 1, etc. A number on square brackets is usually the index number of an item within a list, so yes, hits[0] would be the first item in the hits list.


Note that the code you are referring to will never run. Every frame in update you are creating a new empty list (no items in the list at all) and you then have an “if” statement which runs the following code if there are more than zero items in the list, which there never will be.