Last active
August 18, 2016 14:11
-
-
Save senorincognito/1e70ea8dc5fe20236966097ebfcbb1ce to your computer and use it in GitHub Desktop.
Concatenate two C# byte arrays
This file contains 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 byte[] ArrayCombine(byte[] arr1, byte[] arr2) | |
{ | |
var result = new byte[arr1.Length + arr2.Length]; | |
Buffer.BlockCopy(arr1, 0, result, 0, arr1.Length); | |
Buffer.BlockCopy(arr2, 0, result, arr1.Length, arr2.Length); | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment