質問

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?

役に立ちましたか?

解決

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:

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top