본문 바로가기

C#/String | Byte | Int

C# Byte Array에 Byte Array 합치기

C# Byte Array에 Byte Array 합치기

 

Byte array / Add / Combine / Sum 

private static byte[] Combine(byte[] first, byte[] second)
{
    byte[] ret = new byte[first.Length + second.Length];
    Buffer.BlockCopy(first, 0, ret, 0, first.Length);
    Buffer.BlockCopy(second, 0, ret, first.Length, second.Length);
    return ret;
}

 

'C# > String | Byte | Int' 카테고리의 다른 글

C# byte 압축 / 해제  (0) 2020.07.29
C# Byte Array Compare 바이트 비교  (0) 2020.07.27
C# 난수 생성  (0) 2020.07.26