var list = new List<int>(); foreach(var item in CollectionsMarshal.AsSpan(list)) { } Only usable if the collection is not changed during iteration (read only)