public static long[] copyOfRange(long[] original, int start, int end){if (start > end){throw new System.ArgumentException();}int originalLength = original.Length;if (start < 0 || start > originalLength){throw new System.IndexOutOfRangeException();}int resultLength = end - start;int copyLength = System.Math.Min(resultLength, originalLength - start);long[] result = new long[resultLength];System.Array.Copy(original, start, result, 0, copyLength);return result;}