Use Skip and Take to jump around an enumerated list:
var slice = arr.Skip(5).Take(4);
You may find some different answers and more info at these questions:
Frage
I am retrieving values from my array using arr.GetValue(5, 6, 7, 8)
, arr.GetValue(10, 11, 12, 13)
many times.
Is there a shorthand for this like arr.Get(offset, count)
so that I can use arr.Get(5, 4)
, arr.Get(10, 4)
to get the smaller array from the bigger array?
Lösung
Use Skip and Take to jump around an enumerated list:
var slice = arr.Skip(5).Take(4);
You may find some different answers and more info at these questions: