Byte [] data=https://bbs.csdn.net/topics/new byte [8000].
Like the other byte [] how to merge into the data?
CodePudding user response:
Byte [] b1=new byte [10].
Byte [] b2=new byte [100].
//more byte arraies
Byte [] data;
Using var (ms=new MemoryStream ())
{
Ms. Write (b1, 0, b1. Length);
Ms. Write (b2, 0, b2. Length);
Data=(https://bbs.csdn.net/topics/ms.ToArray);
}
CodePudding user response:
Using System. Linq;
Byte [] data1=new byte [8000].
Byte [] data2=new byte [2000].
Data1=data1. Concat (data2). ToArray ();
CodePudding user response: