How do I clone a range of array elements to a new array?

前端 未结 25 1004
北海茫月
北海茫月 2020-11-22 16:07

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

相关标签:
25条回答
  • 2020-11-22 16:57

    Have you considered using ArraySegment?

    http://msdn.microsoft.com/en-us/library/1hsbd92d.aspx

    0 讨论(0)
提交回复
热议问题