I Have an array X of 10 elements. I would like to create a new array containing all the elements from X that begin at index 3 and ends in index 7. Sure I can easily write a loop that will do it for me but I would like to keep my code cleaner as possible.I also think its stupid to write methods that already exists. Is there a method in C# that can do it for me ?
Somethign like (pseudo code):
Array NewArray = oldArray.createNewArrayFromRange(int BeginIndex , int EndIndex)
Edit In addition to the proposals below , I also would like to ask whether Array.copy does a shallow copy , or it use something else to the copying (like "clone").
Edit
I started a bounty because no one didn't answer yet , Array.Copy doesn't fit my needs . I need the items in the new array to be clones. Array.copy is just a C-Style memcpy equivalent , its not what I looking for.