CSharp examples for System:Array Element Add
Appends the given values to the end of arr
using System.Collections.Generic; using System;// w w w . ja va 2 s . c o m public class Main{ /// <summary> /// Appends the given values to the end of arr /// </summary> /// <returns>The index at which it was added</returns> public static void Concat<T>(ref T[] arr, T[] values) { var oldLen = arr.Length; Array.Resize(ref arr, oldLen + values.Length); Array.Copy(values, 0, arr, oldLen, values.Length); } }