Remove and resize List

I have all my player transforms in a list. And I want to remove one player. I can do that by using Remove.

	void OnNetworkDisconnect ()
	{
		gs.allPlayers.Remove (_playerTransform);
		gs.UpdatePlayerLists ();
		Debug.Log ("removing player");
		Application.LoadLevel("NetworkStart");
	}

However, once I remove the player how do I resize the list back to just the remaining players. By removing the player, his transform is removed, but the list is the same size as in the following pic:

alt text

I attempted to go through list and set it equal to a temp list but it doesnt work.

	public void UpdatePlayerLists() {
		System.Collections.Generic.List<Transform> allPlayersTemp = new System.Collections.Generic.List<Transform>();
		int loop = 0;
		for (loop = 0; loop < allPlayers.Count; loop++) {
			if (allPlayers[loop] != null)
				allPlayersTemp.Add (allPlayers[loop]);
		}
		allPlayers = new System.Collections.Generic.List<Transform> ();
		allPlayers = allPlayersTemp;
	}

Anyone have thoughts on how I can remove a transform from a list and resize the list to the remaining values.

Thanks

voncarp,

The List should not require resizing.
This can be demonstrated with a simple console App.

       static void Main(string[] args)
        {
            List<string> players = new List<string>();
            players.Add("alpha");
            players.Add("bravo");
            players.Add("charlie");
            players.Add("delta");
            players.Add("echo");

            Console.WriteLine("

Capacity: {0}", players.Capacity);
Console.WriteLine(“Count: {0}”, players.Count);
foreach (var player in players)
{
Console.WriteLine(player);
}

            Console.WriteLine( );

            players.Remove("delta");

            Console.WriteLine("

Capacity: {0}", players.Capacity);
Console.WriteLine(“Count: {0}”, players.Count);
foreach (var player in players)
{
Console.WriteLine(player);
}
Console.WriteLine();

            players.TrimExcess();
            Console.WriteLine("

Capacity: {0}", players.Capacity);
Console.WriteLine(“Count: {0}”, players.Count);
}

Which returns :

Capacity: 8 Count: 5 alpha bravo
charlie delta echo

Capacity: 8 Count: 4 alpha bravo
charlie echo

Capacity: 4 Count: 4

Perhaps you could add some code to log to the console the Count and print the list content before and after the List.Remove()