Hi,
I would like to select a range of items in an array of items. For example I have an array of 1000 items, and i would like to "extract" items 100 to 200 and put them in another array.
Can you help me how this can be done?
Hi,
I would like to select a range of items in an array of items. For example I have an array of 1000 items, and i would like to "extract" items 100 to 200 and put them in another array.
Can you help me how this can be done?
var dest = source.Skip(100).Take(100).ToArray();
or manually:
var dest = new MyType[100];
Array.Copy(source, 100, dest, 0, 100);
// source,source-index,dest,dest-index,count