public static void TryAddBytes(this byte[] bytes, ByteArray value, int index) { if (!value.IsNullOrEmpty()) { Array.Copy(value.Bytes, 0, bytes, index, value.Length); } }
public static byte[] ToArray(this ByteArray byteArray) { return(byteArray.IsNullOrEmpty() ? null : byteArray.Bytes.ToArray()); }