Return object from an List<>

Hello,

Today I need your help. I need some code to return a Vector3 from a List of Vector3. Simple, hum? I can’t found an answer. :confused:

I am familiar with Java and I use ArrayList or LinkedList and then I use get() method. Here I don’t know the method to use.

Here’s my code:

	private List<Vector3> lista = new List<Vector3>();

	public Vector3 getAssPosition()
	{
		int aleat = Random.Range (0, lista.Count);
		return lista.RemoveAt(aleat);
	}

I know that RemoveAt() is void… But I didn’t find a method that return Vector3.

Thank you for your help.

return lista[aleat];

lol, thought that array[int] was just for normal arrays. Ty.