What is the C# code to split an array from a given range. Eg:
int[] arr = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}
I want to split arr
it into two arrays. One from 0th to 5th index and the other from 6th to 20th index.
In Java Arrays.copyOfRange()
can be used for this process. What is the C# code for this?