I had a problem, I need to reset the variable when it exceeds the length of the array.
for example
int i=0; do { // нужно, чтобы шло перечисление до конца массива, но когда i=content.Length // i стало равно 0, перечисление продолжилось с начала массива и до его конца // и так пока i = content.Lentgh ICr nextGen = content [i]; i++; } while(content.Count !=0);