CSharp examples for System:Byte Array
Flatten array of byte array
// Copyright (c) Microsoft. All rights reserved. using System.Collections.Generic; public class Main{ public static byte[] Flatten(this IEnumerable<byte[]> segments) {/*from w w w . ja v a2s . co m*/ List<byte> bytes = new List<byte>(); foreach (var segment in segments) { bytes.AddRange(segment); } return bytes.ToArray(); } }