-4

How to convert a jagged array of bytes into a single dimension. Example byte[][] s1_byte . Convert it into byte[].

vaibhav
  • 41
  • 9

1 Answers1

1

try it with SelectMany

int[][] i = new[] {new[]{1,1},new[]{2,2}}; // [1,1],[2,2]
int[] result = i.SelectMany(x => x).ToArray(); // [1,1,2,2]
fubo
  • 44,811
  • 17
  • 103
  • 137