error CS0165: How do i initiatilize a list?

Hi there, I have this problem which says: error CS0165: Use of unassigned local variable.

My code in the function where I have the errors looks like this:

public void ShuffleDeck()
	{
		int deckSize = AgentCard.Count;
		List<GameObject> ShuffleStorage;

		PopulateNumbers(deckSize);
		for (int t = 0; t < deckSize; t++)
		{
			int index = PickUniqueNumber();
			ShuffleStorage.Add(AgentCard[index]);
		}

		PopulateNumbers(deckSize);
		for (int t = 0; t < deckSize; t++)
		{
			int index = PickUniqueNumber();
			AgentCard.Add(ShuffleStorage[index]);
		}
	}

My problem occurs on the lines where I attempt to do ShuffleStorage.Add and AgentCard.Add.

Looking online it seems like the problem is that neither of my lists have been initialized. How do I do this, does anyone know?

Xander

just add the following to fifth row.

ShuffleStorage = new List<GameObject>();

If this script is not attached to a GameObject then you will have to instantiate the list like this :

List<GameObject> ShuffleStorage = new List<GameObject>();