Convert bool[] to byte[]

前端 未结 7 1768
野趣味
野趣味 2020-12-09 06:32

I have a List which I want to convert to a byte[]. How do i do this? list.toArray() creates a bool[].

7条回答
  •  无人及你
    2020-12-09 06:37

    Have a look at the BitConverter class. Depending on the exact nature of your requirement, it may solve your problem quite neatly.

提交回复
热议问题