CSharp examples for System:Array Element
Copies an array to another array
public class Main{ /// <summary> /// Copies an array to another array /// </summary> /// <param name="original"></param> /// <param name="startIndex">The starting index of the array</param> /// <returns>An copied array form the start index</returns> public static E[] copyArray<E>(E[] original, int startIndex) {// w ww . java 2 s. c o m E[] returnArray = new E[original.Length - startIndex]; for (int i = startIndex; i < original.Length; i++) returnArray[i - startIndex] = original[i]; return returnArray; } }