Created
March 16, 2015 21:50
-
-
Save gluschenko/c7cee8716c7faf1088d5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static T[] Concat<T>(this T[] x, T[] y) | |
{ | |
if (x == null) throw new ArgumentNullException("x"); | |
if (y == null) throw new ArgumentNullException("y"); | |
int oldLen = x.Length; | |
Array.Resize<T>(ref x, x.Length + y.Length); | |
Array.Copy(y, 0, x, oldLen, y.Length); | |
return x; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment