get the total valor float inside a Gameobject from a List

hi, i m trying to get the value of a float inside all the Gameobject in my List . i get a new item list everytime the player get inside some trigger. How i can get the value inside this gameobject ?
normally, this variable is inside his script " nucleo ".

float totalElec;
    public void Recoleccion( GameObject ho)
        {   
            listadeNucleos.Add(ho);
            foreach(GameObject x in listadeNucleos)
            { 
                 totalElec += x.GetComponent<nucleo>().elec;
            }
         }

thanks

Thz community, i find the solution is just make a float variable and use the method Sum(); with no parameters :slight_smile:

densidad = electrones.Sum();