Copy values between two classes in two lists.

I need to copy values and lists within the same class of two different lists. Essentially I just want to replace values like say population of classes in list B with that of list A. Also lists within the lists.

I know how to code foreach loops and stuff but want to know the method for this specific issue I have. I have tried many ways but can’t figure it out.

eg:`

//Just imagine these are filled with stuff.
List listA;
List listB;

//There are also lists within the lists above… I need them to transfer too eg:

for loop(){

ListA_.list = ListB*.list;_
_
}_
_
`*_
Now what I need is to transfer stuff from ListA to ListB. But they have to fit the count/position so data gets transferred to the right one.
I am trying foreach and for loops… but I confuse myself further.
How can I do this correctly?

@DeadKenny

Try using these as an example. I think it should help a bit but I did not implement any null checks so make sure to do so when using Lists. I think you can figure it out.

Example Class 1:

public class Zeros : MonoBehaviour {
    public static List<int> ZerosList;

    void Start()
    {
        ZerosList = new List<int>();
        for (int i = 0; i < 10; i++)
        {
            int random = Random.Range(0, 2);
            ZerosList.Add(random);
        }
    }

    // Update is called once per frame
    void Update () {
        for (int i = 0; i < ZerosList.Count; i++)
        {
            if (ZerosList *== 1)*

{
ZerosList.Remove(ZerosList*);*
Ones.OnesList.Add(ZerosList*);*
}
}
PrintList(ZerosList);
* }*

void PrintList(List listToPrint)
{
Debug.Log("Zeros: ");
for (int i = 0; i < listToPrint.Count; i++)
{
Debug.Log(“Array Element” + i + ": " + listToPrint*);*
}
}
}
Example Class 2:
public class Ones : MonoBehaviour {
public static List OnesList;
* void Start () {*
OnesList = new List();
for (int i = 0; i < 10; i++)
{
int random = Random.Range(0, 2);
OnesList.Add(random);
}
* }*

* void Update () {*
for (int i = 0; i < OnesList.Count; i++)
{
if (OnesList == 0)
{
OnesList.Remove(OnesList*);*
Zeros.ZerosList.Add(OnesList*);*
}
}
PrintList(OnesList);
}

void PrintList(List listToPrint)
{
Debug.Log("Ones: ");
for (int i = 0; i < listToPrint.Count; i++)
{
Debug.Log(“Array Element” + i + ": " + listToPrint*);*
}
}
}