How do you get a certain index of a List

I have a list of vector3s and I want to go through and multiply each vector3 by a random.value but when ever I do my script i get the error that the list is a field when type was expected. Here is my script:

    using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class MeshEditing1 : MonoBehaviour {
	public Vector3[] vertices;
	public Vector3[] normals;
	public System.Collections.Generic.List<Vector3> firststep;
	public System.Collections.Generic.List<Vector3> underWater;
	public Vector3[] aboveWater;
	public Mesh mesh;
	public float distance;
	public int f;
	
	// Use this for initialization
	void Start () {
	mesh = GetComponent<MeshFilter>().mesh;
	vertices = mesh.vertices;
	normals = mesh.normals;
		int i = 0;
		while(i < vertices.Length)
		{
		var percent = Random.value;
		var number= (1 + percent)/85;
		//vertices <em>+= normals_* number;_</em>

* var positionPercent = Random.value;*
* int x = i+1;*

* if (percent >= .50f)*
* {*
_ distance= vertices*.magnitude - vertices.magnitude;
//distance = Mathf.Pow( Mathf.Pow((vertices.x - vertices[x].x),2) + Mathf.Pow((vertices.y - vertices[x].y),2) + Mathf.Pow((vertices.z - vertices.z),2),1/2);
if (distance < .5f)
{
firststep.Add(vertices);
x++;
percent = Random.value;
}*_

* }*
* if (percent < .50f)*
* {*
_ underWater.Add(vertices*);
percent = Random.value;
i= x+1;
}*_

* }*

* vertices = firststep.ToArray();*
* //aboveWater = firststep.ToArray();*
* for(int f = 0; f < firststep.Count; f++)*
* {*
* var number = 1+ Random.value;*
_ vertices[f] *= number;_

* }*
_ mesh.vertices= firststep;_

* }*

* // Update is called once per frame*
* void Update () {*

* }*
}
any ideas?
EDIT: edited my question to include all of the code

Like Fattie mentioned try Count instead of Capacity in the while-loop.

Capacity is the number of elements that the List(Of T) can store before resizing is required, while Count is the number of elements that are actually in the List(Of T).

You also have to save the changed value in your list.

firststep[f] *= number;

or

firststep[f] = firststep[f] * number;

Btw. i would recommend for-loop, because you initialise f and increase f by one manually.

for(int f = 0; f < firststep.Count; f++)
{
    firststep[f] *= number;
}

you need to use firststep.Count not Capacity, otherwise you’re trying to access elements that are not created yet (the list internally uses arrays and capacity means the size of the array currently created). secondly instead of firststep[f] * number you need to write firstste[f] *= number. I don’t know what your error is exactly, but you can index lists with the array operator ([]).