注意:
ArraySegment<T> reference to the original array and does NOT make a copy of it, so the changes of segment will affect the array as well.
例如:
var array = new int[] { 5, 8, 9, 20, 70, 44, 2, 4 };
array.ToList().ForEach(i => Console.Write("{0} ", i));
Console.WriteLine();
var segment = new ArraySegment<int>(array, 2, 3);
segment.ToList().ForEach(i => Console.Write("{0} ", i)); // output: 9, 20, 70
Console.WriteLine();
segment.Reverse().ToList().ForEach(i => Console.Write("{0} ", i)); // output 70, 20, 9
Console.WriteLine();
array.ToList().ForEach(i => Console.Write("{0} ", i)); // no change
Console.WriteLine();