How can I access the next value in a collection inside a foreach loop in C#? July 22, 2023 by Tarik You can’t. Use a for instead for(int i=0; i<list.Count-1; i++) Compare(list[i], list[i+1]);