//присваиваем переменной индекс, который равен значению первого элемента var c = linkedList.ElementAt(linkedList.First.Value); //добавляем в лист secondList.AddLast(c); for(int x = 1; x < linkedList.Count; x++ ) { ////присваиваем переменной индекс, который равен значению текущего элемента c = linkedList.ElementAt(c); secondList.AddLast(c); }
Due to the fact that the index of the elements of the array starts with [0], ArgumentOutOfRangeException crashes (the list always starts with 1)
The question is, is it possible in Sharpe to redefine the first index or solve the problem somehow differently?