In C# how can I truncate a byte[] array

后端 未结 6 712
太阳男子
太阳男子 2021-01-03 18:27

I have a byte[] array of one size, and I would like to truncate it into a smaller array?

I just want to chop the end off.

6条回答
  •  别那么骄傲
    2021-01-03 18:46

    You could use Array.Resize, but all this really does is make a truncated copy of the original array and then replaces the original array with the new one.

提交回复
热议问题